From ff5aba19f7032d86bb4d4bf7ba0328b3e21f262e Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 9 Mar 2021 19:09:41 +0000 Subject: [PATCH] Fix crash when searching screens and selecting layouts --- .../NavigationPanel/ComponentNavigationTree/PathTree.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte index 9a4b02a4f1..09e8948407 100644 --- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte @@ -30,7 +30,8 @@ $: filteredScreens = getFilteredScreens(allScreens, $screenSearchString) $: hasSearchMatch = $screenSearchString && filteredScreens.length > 0 $: noSearchMatch = $screenSearchString && !filteredScreens.length - $: routeSelected = route.subpaths[selectedScreen.routing.route] !== undefined + $: routeSelected = + route.subpaths[selectedScreen?.routing?.route] !== undefined $: routeOpened = routeManuallyOpened || routeSelected || hasSearchMatch const changeScreen = screenId => {