From 45476a7d2e36c2bd811df10305e910da40aba0a1 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 11 Jun 2024 11:11:03 -0300 Subject: search: fix parentName field not working --- src/util/search-spec.js | 9 ++++++--- 1 file 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); -- cgit 1.3.0-6-gf8a5