diff options
Diffstat (limited to 'src/util')
-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); |