« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data/things/track.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/data/things/track.js b/src/data/things/track.js
index a0d2f641..a4497ec0 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -54,6 +54,7 @@ import {
   simpleDate,
   simpleString,
   singleReference,
+  soupyFind,
   thing,
   urls,
   wikiData,
@@ -329,10 +330,14 @@ export class Track extends Thing {
         notFoundValue: input.value([]),
       }),
 
+      withPropertyFromObject({
+        object: 'find',
+        property: input.value('track'),
+      }),
+
       referenceList({
         class: input.value(Track),
-        find: input.value(find.track),
-        data: 'trackData',
+        find: '#find.track',
       }),
     ],
 
@@ -341,10 +346,14 @@ export class Track extends Thing {
         notFoundValue: input.value([]),
       }),
 
+      withPropertyFromObject({
+        object: 'find',
+        property: input.value('track'),
+      }),
+
       referenceList({
         class: input.value(Track),
-        find: input.value(find.track),
-        data: 'trackData',
+        find: '#find.track',
       }),
     ],
 
@@ -376,6 +385,8 @@ export class Track extends Thing {
 
     // Update only
 
+    find: soupyFind(),
+
     albumData: wikiData({
       class: input.value(Album),
     }),