diff options
Diffstat (limited to 'src/static/client.js')
-rw-r--r-- | src/static/client.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/static/client.js b/src/static/client.js index dcb39226..15f21fdb 100644 --- a/src/static/client.js +++ b/src/static/client.js @@ -487,10 +487,12 @@ function updateStickyHeading() { } of stickyHeadingInfo) { let closestHeading = null; - if (contentCover.getBoundingClientRect().bottom < 0) { - stickyCoverContainer.classList.add('visible'); - } else { - stickyCoverContainer.classList.remove('visible'); + if (contentCover && stickyCoverContainer) { + if (contentCover.getBoundingClientRect().bottom < 0) { + stickyCoverContainer.classList.add('visible'); + } else { + stickyCoverContainer.classList.remove('visible'); + } } if (topOfViewInside(contentContainer)) { |