« get me outta code hell

Merge branch 'data-steps' of github.com:hsmusic/hsmusic-wiki into data-steps - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/linkThing.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-09 09:44:34 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-09 09:44:34 -0300
commit360342696a7e29dbeb0d8b54228ba2c0ac3c162b (patch)
tree4110b7e2737954dbbe5c64ad7ddaed5eabaacb62 /src/content/dependencies/linkThing.js
parentc4b40f4b7fa7ef5439845538af22cc9076e4cb9c (diff)
parentf9247a3a21abd26ae22d769d2da7d4ce6e99461d (diff)
Merge branch 'data-steps' of github.com:hsmusic/hsmusic-wiki into data-steps
Diffstat (limited to 'src/content/dependencies/linkThing.js')
-rw-r--r--src/content/dependencies/linkThing.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/content/dependencies/linkThing.js b/src/content/dependencies/linkThing.js
index 4ebf4d76..e3e2608f 100644
--- a/src/content/dependencies/linkThing.js
+++ b/src/content/dependencies/linkThing.js
@@ -44,16 +44,15 @@ export default {
   generate(data, relations, slots, {html}) {
     const path = [data.pathKey, data.directory];
 
-    let content = slots.content;
-
     const name =
       (slots.preferShortName
-        ? data.nameShort ?? data.name
-        : data.name);
+        ? data.nameShort ?? data.name ?? null
+        : data.name ?? null);
 
-    if (html.isBlank(content)) {
-      content = name;
-    }
+    const content =
+      (html.isBlank(slots.content)
+        ? name
+        : slots.content);
 
     let color = null;
     if (slots.color === true) {