« 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.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/static/client.js b/src/static/client.js
index 0c760500..efae8501 100644
--- a/src/static/client.js
+++ b/src/static/client.js
@@ -528,7 +528,7 @@ const stickyHeadingInfo = Array.from(document.querySelectorAll('.content-sticky-
     const stickySubheadingRow = stickyContainer.querySelector('.content-sticky-subheading-row');
     const stickySubheading = stickySubheadingRow.querySelector('h2');
     const stickyCoverContainer = stickyContainer.querySelector('.content-sticky-heading-cover-container');
-    const stickyCover = stickyCoverContainer.querySelector('.content-sticky-heading-cover');
+    const stickyCover = stickyCoverContainer?.querySelector('.content-sticky-heading-cover');
     const contentHeadings = Array.from(contentContainer.querySelectorAll('.content-heading'));
     const contentCover = contentContainer.querySelector('#cover-art-container');
 
@@ -557,7 +557,7 @@ function prepareStickyHeadings() {
     contentCover,
     stickyCover,
   } of stickyHeadingInfo) {
-    const coverRevealImage = contentCover.querySelector('.reveal');
+    const coverRevealImage = contentCover?.querySelector('.reveal');
     if (coverRevealImage) {
       coverRevealImage.addEventListener('hsmusic-reveal', () => {
         stickyCover.classList.remove('content-sticky-heading-cover-needs-reveal');