diff --git a/src/components/Header.vue b/src/components/Header.vue index 97f4300fb0ac578f41d369ab07e2b77ee6eced54..8b7c326b6dc9fd28148a3c559e41dca756f62880 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -43,13 +43,14 @@ export default { return helpers.group_list(this.lemmas) }, inflection_groups_by_lemma: function() { + let components = Object.keys(this.$options.components) return this.lemmas.map( function(lemma_){ let inflection_groups = lemma_.paradigm_info.reduce((acc, std) => Object.assign(acc, {[std.inflection_group]: []}), {}) lemma_.paradigm_info.forEach(std => inflection_groups[std.inflection_group].push(std)) return { lemma: lemma_.lemma, - inflection_groups: inflection_groups + inflection_groups: Object.fromEntries(Object.entries(inflection_groups).filter(e => components.includes(e[0]))) } } )