[Vuejs]-Undefined method inside vue.js app returns no data

0👍

Within your map you’re not returning any value – try this instead:

this.favorites = posts.items.map(item => {
  const items = {};
  items['id'] = item.ID;
  items['name'] = item.post_title;
  return items;
});

Leave a comment