From 1c0799a30af356210708abb4449dc753f90cebfa Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Wed, 23 Oct 2019 00:49:38 +0200 Subject: [PATCH] Also check the items source for name or title to find out if the response item came from movie or show index --- src/components/SearchInput.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/SearchInput.vue b/src/components/SearchInput.vue index 70b1740..5a39e8f 100644 --- a/src/components/SearchInput.vue +++ b/src/components/SearchInput.vue @@ -108,17 +108,17 @@ export default { this.elasticSearchResults = data.map(item => { const index = item._index.slice(0, -1) - if (index === 'movie') { + if (index === 'movie' || item._source.original_title) { return { name: item._source.original_title, id: item._source.id, - type: index + type: 'movie' } - } else if (index === 'show') { + } else if (index === 'show' || item._source.original_name) { return { name: item._source.original_name, id: item._source.id, - type: index + type: 'show' } } })