« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/link.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/link.js')
-rw-r--r--src/util/link.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/link.js b/src/util/link.js
index 7d53edc..e692255 100644
--- a/src/util/link.js
+++ b/src/util/link.js
@@ -38,6 +38,7 @@ const linkHelper =
     class: className = '',
     color: color2 = true,
     hash = '',
+    preferShortName = false,
   }) => {
     let href = hrefFn(thing, {to});
 
@@ -65,7 +66,10 @@ const linkHelper =
             : '',
         class: className,
       },
-      text || thing.name
+      (text ||
+        (preferShortName
+          ? thing.nameShort ?? thing.name
+          : thing.name))
     );
   };