diff --git a/packages/client/src/components/ui/menu.vue b/packages/client/src/components/ui/menu.vue index c5cb4b477..a93cc8cda 100644 --- a/packages/client/src/components/ui/menu.vue +++ b/packages/client/src/components/ui/menu.vue @@ -82,7 +82,7 @@ watch(() => props.items, () => { if (item && 'then' in item) { // if item is Promise items[i] = { type: 'pending' }; item.then(actualItem => { - items[i] = actualItem; + items2[i] = actualItem; }); } } diff --git a/packages/client/src/types/menu.ts b/packages/client/src/types/menu.ts index d178a8208..ed67e6ab8 100644 --- a/packages/client/src/types/menu.ts +++ b/packages/client/src/types/menu.ts @@ -15,5 +15,6 @@ export type MenuButton = { type?: 'button', text: string, icon?: string, indicat export type MenuPending = { type: 'pending' }; type OuterMenuItem = MenuDivider | MenuNull | MenuLabel | MenuLink | MenuA | MenuUser | MenuSwitch | MenuButton; -export type MenuItem = OuterMenuItem | Promise; +type OuterPromiseMenuItem = Promise; +export type MenuItem = OuterMenuItem | OuterPromiseMenuItem; export type InnerMenuItem = MenuDivider | MenuPending | MenuLabel | MenuLink | MenuA | MenuUser | MenuSwitch | MenuButton;