diff --git a/js/menu.js b/js/menu.js index d15908fa..72a3cb4b 100644 --- a/js/menu.js +++ b/js/menu.js @@ -771,7 +771,9 @@ let referencePane = { this.$tableContainer.appendChild(this.$table); this.$pane.appendChild(this.$tableContainer); - menu.$specContainer.appendChild(this.$container); + if (menu != null) { + menu.$specContainer.appendChild(this.$container); + } }, activate() { @@ -1106,6 +1108,9 @@ function doShortcut(e) { } function init() { + if (document.getElementById('menu') == null) { + return; + } menu = new Menu(); let $container = document.getElementById('spec-container'); $container.addEventListener(