Skip to content

Commit 17dce6d

Browse files
committed
[fix] Avoid JS error when menu is not displayed
1 parent a1614b4 commit 17dce6d

File tree

1 file changed

+5
-0
lines changed
  • openwisp_utils/admin_theme/static/admin/js

1 file changed

+5
-0
lines changed

openwisp_utils/admin_theme/static/admin/js/menu.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ const MenuTransitionTime = "0.1s";
1313
var wasActiveGroupOpen = false;
1414

1515
(function () {
16+
// popup page or other pages
17+
// where menu is not displayed
18+
if (!owMenu) {
19+
return;
20+
}
1621
setMenu();
1722
initGroupViewHandlers();
1823
initToggleMenuHandlers();

0 commit comments

Comments
 (0)