Skip to content

Commit

Permalink
indexerName computed prop was missing some code
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkykh committed Jul 4, 2018
1 parent 76d140a commit 2de7d08
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions themes-default/slim/views/vue-components/app-link.mako
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Vue.component('app-link', {
return this.$store.state.config;
},
indexerName() {
const { config, indexerId } = this;
const { indexers } = config.indexers.config;
if (!indexerId) return undefined;
// Returns `undefined` if not found
return Object.keys(indexers).find(indexer => indexers[indexer].id === parseInt(indexerId, 10));
},
Expand Down
2 changes: 2 additions & 0 deletions themes/dark/templates/vue-components/app-link.mako
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Vue.component('app-link', {
return this.$store.state.config;
},
indexerName() {
const { config, indexerId } = this;
const { indexers } = config.indexers.config;
if (!indexerId) return undefined;
// Returns `undefined` if not found
return Object.keys(indexers).find(indexer => indexers[indexer].id === parseInt(indexerId, 10));
},
Expand Down
2 changes: 2 additions & 0 deletions themes/light/templates/vue-components/app-link.mako
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Vue.component('app-link', {
return this.$store.state.config;
},
indexerName() {
const { config, indexerId } = this;
const { indexers } = config.indexers.config;
if (!indexerId) return undefined;
// Returns `undefined` if not found
return Object.keys(indexers).find(indexer => indexers[indexer].id === parseInt(indexerId, 10));
},
Expand Down

0 comments on commit 2de7d08

Please sign in to comment.