« get me outta code hell

client: fix sticky headings not working on pages w/o cover - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-09-16 21:42:55 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-16 21:42:55 -0300
commitf3a855d772d51749c6f9d50632dc74792f902b29 (patch)
tree5e6d3e89cb1a4ccabd1e1619bdd5ac007bf23327
parent0bb9482518badd10b6e2c3e8e2ba99367b6f6fd1 (diff)
client: fix sticky headings not working on pages w/o cover
-rw-r--r--src/static/client2.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/static/client2.js b/src/static/client2.js
index 7897041..d9afcb0 100644
--- a/src/static/client2.js
+++ b/src/static/client2.js
@@ -539,7 +539,7 @@ const stickyHeadingInfo = Array.from(document.querySelectorAll('.content-sticky-
     const contentHeadings = Array.from(contentContainer.querySelectorAll('.content-heading'));
     const contentCover = contentContainer.querySelector('#cover-art-container');
 
-    if (stickyCover.querySelector('.image-text-area')) {
+    if (stickyCover?.querySelector('.image-text-area')) {
       stickyCoverContainer.remove();
       stickyCoverContainer = null;
       stickyCover = null;