« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/things/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/content')
-rw-r--r--src/data/composite/things/content/withSourceText.js3
-rw-r--r--src/data/composite/things/content/withSourceURLs.js3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/data/composite/things/content/withSourceText.js b/src/data/composite/things/content/withSourceText.js
index e0cd2f15..d310e8ea 100644
--- a/src/data/composite/things/content/withSourceText.js
+++ b/src/data/composite/things/content/withSourceText.js
@@ -28,7 +28,8 @@ export default templateCompositeFrom({
         ['#firstPartWithExternalLink']:
           annotationParts
             .find(nodes => nodes
-              .some(node => node.type === 'external-link')),
+              .some(node => node.type === 'external-link')) ??
+          null,
       }),
     },
 
diff --git a/src/data/composite/things/content/withSourceURLs.js b/src/data/composite/things/content/withSourceURLs.js
index 263eb5f6..f1e8dbc0 100644
--- a/src/data/composite/things/content/withSourceURLs.js
+++ b/src/data/composite/things/content/withSourceURLs.js
@@ -29,7 +29,8 @@ export default templateCompositeFrom({
         ['#firstPartWithExternalLink']:
           annotationParts
             .find(nodes => nodes
-              .some(node => node.type === 'external-link')),
+              .some(node => node.type === 'external-link')) ??
+          null,
       }),
     },