From ca3e3624c026778f162ea039191aab876e109043 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 16 Mar 2023 12:48:31 +0100 Subject: [PATCH] fix key left navigation --- .../apps/editor/component/ComponentNavigation.svelte | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte b/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte index ada7387d42..df828f01a8 100644 --- a/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte +++ b/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte @@ -54,12 +54,10 @@ if (currentIndex !== -1 && currentIndex > 0) { const left = sortedGridItems[currentIndex - 1] - if (left.data.type === 'tablecomponent') { - if (left.data.actionButtons.length >= 1) { - $selectedComponent = left.data.actionButtons[left.data.actionButtons.length - 1].id - } else { - $selectedComponent = left.id - } + if (left.data.type === 'tablecomponent' && left.data.actionButtons.length >= 1) { + $selectedComponent = left.data.actionButtons[left.data.actionButtons.length - 1].id + } else { + $selectedComponent = left.id } } }