Browse Source

fixed js footer script

Piotr Labudda 6 years ago
parent
commit
edb49cab93
1 changed files with 4 additions and 3 deletions
  1. 4 3
      theme/view/footer.php

+ 4 - 3
theme/view/footer.php

@@ -28,9 +28,10 @@
 	//}
 	//}
   // show/hide menu
   // show/hide menu
   function toggledisplay(elementID, style = 'none')  {
   function toggledisplay(elementID, style = 'none')  {
-      (function(style) {
-          style.display = (style.display === 'none' ? '' : 'none');
-      })(document.getElementById(elementID).style);
+    (function(node) {
+      if (!node) return;
+      node.style.display = (node.style.display === 'none' ? '' : 'none');
+    })(document.getElementById(elementID));
   }
   }
 
 
   // todo: do usuniecia
   // todo: do usuniecia