« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/util/search-spec.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/util/search-spec.js b/src/util/search-spec.js
index 79e8ee95..bc24e1a1 100644
--- a/src/util/search-spec.js
+++ b/src/util/search-spec.js
@@ -118,12 +118,15 @@ export const searchSpec = {
       fields.primaryName =
         thing.name;
 
+      const kind =
+        thing.constructor[Symbol.for('Thing.referenceType')];
+
       fields.parentName =
-        (fields.kind === 'track'
+        (kind === 'track'
           ? thing.album.name
-       : fields.kind === 'group'
+       : kind === 'group'
           ? thing.category.name
-       : fields.kind === 'flash'
+       : kind === 'flash'
           ? thing.act.name
           : null);