Minify doubling js script
-
I have an odd issue using Minify. I have the Complianz plugin and WP-Optimize installed and when I enable Minify the site will not load all the way and consol shows Uncaught SyntaxError: redeclaration of let cmplzBlockedConten twpo-minify-footer-1e719319.min.js:463:6 note: Previously declared at line 449, column 6. With Minify on it’s duplicating the code below.
With Minify off the code below is there once.
<script id=”cmplz-cookiebanner-js-after”>
let cmplzBlockedContent = document.querySelector(‘.cmplz-blocked-content-notice’);
if ( cmplzBlockedContent) {
cmplzBlockedContent.addEventListener(‘click’, function(event) {
event.stopPropagation();
});
}
</script>
- You must be logged in to reply to this topic.