-
Notifications
You must be signed in to change notification settings - Fork 164
Description
There are two alert()
calls in the source code of SmartMenus:
smartmenus/src/jquery.smartmenus.js
Line 1163 in 6b26165
alert('ERROR\n\nSmartMenus jQuery init:\nThe value of the "data-sm-options" attribute must be valid JSON.'); smartmenus/src/jquery.smartmenus.js
Line 1025 in 6b26165
alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.');
The call to alert()
stops rendering the page and depending on the website can appear multiple times. Instead of showing this error it should log to console with console.error()
. That way visitors of a website aren't hindered by misconfiguration.
Edit: I have an existing website built with WordPress and Elementor Pro which seemingly uses this plugin (1.2.1 now, but before 1.1.x). There are no elements with the data-sm-options
attribute yet the alert pops-up. It didn't do that with the 1.1.x version of SmartMenus.