« get me outta code hell

data: group: don't assume description is set - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-03-01 07:32:55 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-03-01 07:53:50 -0400
commite1ab9bbf56113257c9d0818912c95f62c458f1e3 (patch)
tree678c6427afffbc60e11a011b2239c16624bb51e2 /src/data
parent5154ff908db6ca5dfeb2dd0587f83846bbde2500 (diff)
data: group: don't assume description is set
Diffstat (limited to 'src/data')
-rw-r--r--src/data/things/group.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/data/things/group.js b/src/data/things/group.js
index b6fba79c..0dbbbb7f 100644
--- a/src/data/things/group.js
+++ b/src/data/things/group.js
@@ -50,7 +50,10 @@ export class Group extends Thing {
 
       expose: {
         dependencies: ['description'],
-        compute: ({description}) => description.split('<hr class="split">')[0],
+        compute: ({description}) =>
+          (description
+            ? description.split('<hr class="split">')[0]
+            : null),
       },
     },