« get me outta code hell

client: don't have album sidebar break on tracks w/o href - 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-10-23 23:43:44 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-23 23:43:44 -0300
commitd62e174c5b7d71c38270ef93da7ad4b640c4d72b (patch)
treec9d70cd5f87fed7179f3eddc4a43c84760cda466
parent22b1823dd82bf4fd2063d121c743d02e452fe7f3 (diff)
client: don't have album sidebar break on tracks w/o href
-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 4f4a7153..758d91a6 100644
--- a/src/static/client2.js
+++ b/src/static/client2.js
@@ -1241,7 +1241,7 @@ function getAlbumCommentarySidebarReferences() {
 
   info.sidebarTrackDirectories =
     info.sidebarTrackLinks
-      .map(el => el.getAttribute('href').slice(1));
+      .map(el => el.getAttribute('href')?.slice(1) ?? null);
 
   info.sidebarTrackSections =
     Array.from(info.sidebar.getElementsByTagName('details'));