JS error from wcj-admin.js + easy fix
-
Hi,
The file
booster-plus-for-woocommerce/includes/js/wcj-admin.js
throws an error on at least some pages like Shipping Methods, causing no shipping methods to be shown (and/or other subsequent JS to break). Probably not a problem for most people, because in this particular case not every plugin is currently up to date for reasons. Even so, it’s best to always do the below check, imho.Error message in browser console:
Uncaught TypeError: circleBadge is null
I fixed it by adding an if-statement, like this:
if (null !== circleBadge) { // ADDED THIS circleBadge.addEventListener('click', showCircles); function showCircles() { subCircles.forEach(circle => { circle.classList.toggle("show"); }) }; } // ADDED THIS
`
The js file in question says it’s since 5.4.2, so the problem is since then. Booster is up to date @ v5.4.8.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘JS error from wcj-admin.js + easy fix’ is closed to new replies.