JavaScript Error on pages without variations
-
On all the pages without variations, even non-shop pages, I’ll get the following JS error:
Cannot read property 'addEventListener' of null
Because it tries to bind the eventlistener to an element that is not there. Simple wrapping it with an if statement should fix it.
Screenshot of the issue:
Everything works fine on a page with a variation.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘JavaScript Error on pages without variations’ is closed to new replies.