Skip to content

Commit

Permalink
Also check the items source for name or title to find out if the resp…
Browse files Browse the repository at this point in the history
…onse item came from movie or show index
  • Loading branch information
KevinMidboe committed Oct 22, 2019
1 parent 2b39550 commit 1c0799a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/SearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
})
Expand Down

0 comments on commit 1c0799a

Please sign in to comment.