mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Prevented page navigation highlighting erroring
This was when no page nav was on the page
This commit is contained in:
parent
b65abd25e0
commit
06cf175b08
@ -170,7 +170,7 @@ let setupPageShow = window.setupPageShow = function (pageId) {
|
||||
// fetch all the headings.
|
||||
let headings = document.querySelector('.page-content').querySelectorAll('h1, h2, h3, h4, h5, h6');
|
||||
// if headings are present, add observers.
|
||||
if (headings.length > 0) {
|
||||
if (headings.length > 0 && pageNav !== null) {
|
||||
addNavObserver(headings);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user