Skip to content

Commit 1659ed0

Browse files
fix some errors that are thrown when using the --old-toc option (#577)
1 parent b9a817d commit 1659ed0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

js/menu.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,9 @@ let referencePane = {
771771
this.$tableContainer.appendChild(this.$table);
772772
this.$pane.appendChild(this.$tableContainer);
773773

774-
menu.$specContainer.appendChild(this.$container);
774+
if (menu != null) {
775+
menu.$specContainer.appendChild(this.$container);
776+
}
775777
},
776778

777779
activate() {
@@ -1106,6 +1108,9 @@ function doShortcut(e) {
11061108
}
11071109

11081110
function init() {
1111+
if (document.getElementById('menu') == null) {
1112+
return;
1113+
}
11091114
menu = new Menu();
11101115
let $container = document.getElementById('spec-container');
11111116
$container.addEventListener(

0 commit comments

Comments
 (0)