« get me outta code hell

polish up album & album extras nav - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/misc-templates.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-12-21 20:09:17 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-12-21 20:09:17 -0400
commitf215bf15ae61f9ad08f8992cbf273f0b1d0ff6a0 (patch)
treeae79cc87f853762eac7d02059fbd368f73c91b0c /src/misc-templates.js
parent9412fefa5d53af171a91bd3b8ce958d35a7f87d7 (diff)
polish up album & album extras nav
Diffstat (limited to 'src/misc-templates.js')
-rw-r--r--src/misc-templates.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/misc-templates.js b/src/misc-templates.js
index 5d08270..5dd9649 100644
--- a/src/misc-templates.js
+++ b/src/misc-templates.js
@@ -676,6 +676,7 @@ function unbound_generateNavigationLinks(current, {
   data,
   isMain = true,
   linkKey = 'anything',
+  returnAsArray = false,
 }) {
   let previousLink, nextLink;
 
@@ -713,11 +714,13 @@ function unbound_generateNavigationLinks(current, {
     ...additionalLinks,
   ].filter(Boolean);
 
-  if (!links.length) {
+  if (returnAsArray) {
+    return links;
+  } else if (empty(links)) {
     return '';
+  } else {
+    return language.formatUnitList(links);
   }
-
-  return language.formatUnitList(links);
 }
 
 // Sticky heading, ooooo