« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/generateSecondaryNavParentSiblingsPart.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/content/dependencies/generateSecondaryNavParentSiblingsPart.js b/src/content/dependencies/generateSecondaryNavParentSiblingsPart.js
index c5f1df84..82b5d151 100644
--- a/src/content/dependencies/generateSecondaryNavParentSiblingsPart.js
+++ b/src/content/dependencies/generateSecondaryNavParentSiblingsPart.js
@@ -63,6 +63,8 @@ export default {
 
   generate: (relations, slots, {html, language}) =>
     html.tag('span',
+      {[html.onlyIfContent]: true},
+
       slots.attributes,
 
       !html.isBlank(slots.colorStyle) &&
@@ -70,11 +72,15 @@ export default {
           .slot('context', 'primary-only'),
 
       language.encapsulate(slots.stringsKey, workingCapsule => {
-        const workingOptions = {};
+        const workingOptions = {
+          [language.onlyIfOptions]: [slots.mainLinkOption],
+        };
 
         workingOptions[slots.mainLinkOption] =
-          slots.mainLink
-            .slot('color', false);
+          (html.isBlank(slots.mainLink)
+            ? null
+            : slots.mainLink
+                .slot('color', false));
 
         if (slots.mode === 'album') addPreviousNext: {
           if (html.isBlank(slots.previousLink) && html.isBlank(slots.nextLink)) {