« 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
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things')
-rw-r--r--src/data/composite/things/content/withWebArchiveDate.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/data/composite/things/content/withWebArchiveDate.js b/src/data/composite/things/content/withWebArchiveDate.js
index 3aaa4f64..08cebd7f 100644
--- a/src/data/composite/things/content/withWebArchiveDate.js
+++ b/src/data/composite/things/content/withWebArchiveDate.js
@@ -9,13 +9,14 @@ export default templateCompositeFrom({
 
   steps: () => [
     {
-      dependencies: ['annotation'],
+      dependencies: ['sourceURLs'],
 
-      compute: (continuation, {annotation}) =>
+      compute: (continuation, {sourceURLs}) =>
         continuation({
           ['#dateText']:
-            annotation
-              ?.match(/https?:\/\/web.archive.org\/web\/([0-9]{8,8})[0-9]*\//)
+            sourceURLs
+              .find(url => url.match(/https?:\/\/web\.archive\.org/))
+              ?.match(/\/web\/([0-9]{8,8})[0-9]*\//)
               ?.[1] ??
             null,
         }),