« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/static/client.js')
-rw-r--r--src/static/client.js10
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)) {