Skip to content

Commit

Permalink
fix: handle empty menu #430
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Nov 18, 2024
1 parent 0f93419 commit 96ef4f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stores/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ export const menuStore = defineStore('menu', {

actions: {
async init(config: VidoConfig) {
const menuItems = await getMenu(config)
this.fetchConfig(menuItems)
try {
const menuItems = await getMenu(config)
this.fetchConfig(menuItems)
}
catch (err: any) {}
},

setSelectedCategoryIds(selectedCategoryIds: ApiMenuCategory['id'][]) {
Expand Down

0 comments on commit 96ef4f7

Please sign in to comment.