Skip to content

Commit

Permalink
fix some errors that are thrown when using the --old-toc option (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra authored Mar 12, 2024
1 parent b9a817d commit 1659ed0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 1659ed0

Please sign in to comment.