From ece5c0ec6c77e420135a77e842faa256b33cd332 Mon Sep 17 00:00:00 2001 From: Alexey Zinoviev Date: Fri, 21 Jun 2024 12:40:51 +0400 Subject: [PATCH] ezqms-1028: fix actions in tree element (#5887) Signed-off-by: Alexey Zinoviev --- .../src/components/navigator/TreeElement.svelte | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/view-resources/src/components/navigator/TreeElement.svelte b/plugins/view-resources/src/components/navigator/TreeElement.svelte index 64f053ca0d..f77f51d9a8 100644 --- a/plugins/view-resources/src/components/navigator/TreeElement.svelte +++ b/plugins/view-resources/src/components/navigator/TreeElement.svelte @@ -58,10 +58,12 @@ let inlineActions: Action[] = [] let popupMenuActions: Action[] = [] - $: actions().then((result) => { - inlineActions = result.filter((action) => action.inline === true) - popupMenuActions = result.filter((action) => action.inline !== true) - }) + $: if (actions !== undefined) { + actions().then((result) => { + inlineActions = result.filter((action) => action.inline === true) + popupMenuActions = result.filter((action) => action.inline !== true) + }) + } async function onMenuClick (ev: MouseEvent): Promise { // Read actual popup actions on open as visibility might have been changed