From cbaa1eadfd1ba6633b82a9b7bb85f7481b13a913 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 4 Jun 2020 10:02:29 +0200 Subject: [PATCH] Fix toggle_menu undefined error --- src/includes/js/LSdefault.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/includes/js/LSdefault.js b/src/includes/js/LSdefault.js index a4f11a49..9828cb92 100644 --- a/src/includes/js/LSdefault.js +++ b/src/includes/js/LSdefault.js @@ -75,7 +75,9 @@ var LSdefault = new Class({ this.initializeLang(); this.toggle_menu = $('toggle-menu'); - this.toggle_menu.addEvent('click', this.toggleMenu.bind(this)); + if (this.toggle_menu) { + this.toggle_menu.addEvent('click', this.toggleMenu.bind(this)); + } }, initializeLang: function() {