[Vuejs]-Vue getter property undefined

1👍

If pages property is empty, then state.pages.find((page) => (page.template = 'home')) may return undefined.
And in your code you want to get home_advantages from the find result.
Your code should look like this:

var page = state.pages.find((page) => (page.template == 'home'));
if (!page) {
   return null;
}
return page.home_advantages

Leave a comment