Skip to content

Commit

Permalink
🥅 Handle book items not array
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Oct 29, 2024
1 parent cca7de9 commit a6367c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mixins/bookstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export default {
return this.$i18n.locale.includes(items.locales);
},
filterBookstoreListItemsByLocale(books) {
return books.filter(this.checkBookstoreListItemIsMatchedLocale);
return Array.isArray(books)
? books.filter(this.checkBookstoreListItemIsMatchedLocale)
: [];
},
},
};

0 comments on commit a6367c2

Please sign in to comment.