diff --git a/frontend/src/components/Recipe/RecipeViewer/RecipeChips.vue b/frontend/src/components/Recipe/RecipeViewer/RecipeChips.vue index 825f2e8d9..5ac8d193b 100644 --- a/frontend/src/components/Recipe/RecipeViewer/RecipeChips.vue +++ b/frontend/src/components/Recipe/RecipeViewer/RecipeChips.vue @@ -32,7 +32,8 @@ export default { methods: { getSlug(name) { if (this.category) { - return this.allCategories.filter(x => x.name == name)[0].slug; + const matches = this.allCategories.filter(x => x.name == name); + if (matches.length > 0) return matches[0].slug; } }, },