Uncaught SyntaxError: Unexpected token =>
-
I ran a Google ‘mobile friendly’ test and it said there was an ‘Uncaught SyntaxError: Unexpected token =>’
The details gave me a source “mysite dot com/wp-content/plugins/atomic-blocks/dist/assets/js/dismiss.js?ver=1556813107:6”
I put that into a browser, it gives this:
(function($) { $(document).ready(function() { const elems = document.querySelectorAll('.ab-block-notice.ab-dismissable[data-id]'); elems.forEach(el => { const uid = el.getAttribute( 'data-id' ); if ( ! localStorage.getItem(<code>notice-${uid}</code>) ) { el.style.display = 'block'; } if ( $( '.ab-notice-dismiss' ).length ) { el.querySelector('.ab-notice-dismiss').addEventListener('click', () => { localStorage.setItem(<code>notice-${uid}</code>, 1); el.style.display = ''; }) } }) }); })(jQuery);
Is it problem with the plugin?
How significant is it?Thanks
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Uncaught SyntaxError: Unexpected token =>’ is closed to new replies.