From 0205db104d3340d3e587e75eb295172306b52a94 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Thu, 29 Feb 2024 09:15:01 +0000 Subject: [PATCH] FIX: clicking on design tab while data tab loads does not navigate correctly (#13152) * If still loading, try navigation later * Set active tab even if still loading * Refactor - timeout not needed! --- .../pages/builder/app/[application]/_layout.svelte | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/_layout.svelte index c7f8c98e73..dd66f5bc34 100644 --- a/packages/builder/src/pages/builder/app/[application]/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_layout.svelte @@ -69,11 +69,12 @@ // brought back to the same screen. const topItemNavigate = path => () => { const activeTopNav = $layout.children.find(c => $isActive(c.path)) - if (!activeTopNav) return - builderStore.setPreviousTopNavPath( - activeTopNav.path, - window.location.pathname - ) + if (activeTopNav) { + builderStore.setPreviousTopNavPath( + activeTopNav.path, + window.location.pathname + ) + } $goto($builderStore.previousTopNavPath[path] || path) }