diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-11 11:11:03 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-12 16:02:19 -0300 |
commit | 45476a7d2e36c2bd811df10305e910da40aba0a1 (patch) | |
tree | 0f36df7a24b4edb2c4fa47eb154cceb4602e3923 /src | |
parent | 95fa266872c0f3ec606d346ec031944219211fc1 (diff) |
search: fix parentName field not working
Diffstat (limited to 'src')
-rw-r--r-- | src/util/search-spec.js | 9 |
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); |