From 96ef4f74b888980b574ad4314200df3b3eeb2b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Viricel?= Date: Mon, 18 Nov 2024 14:10:07 +0100 Subject: [PATCH] fix: handle empty menu #430 --- stores/menu.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stores/menu.ts b/stores/menu.ts index 4c9d0682..54071d6e 100644 --- a/stores/menu.ts +++ b/stores/menu.ts @@ -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'][]) {