From 0ffd080b0f2b09d7d1dedbdb4e4882e17a562aab Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 21 Mar 2022 15:21:29 +0000 Subject: [PATCH] Fix issue when currentAsset is null and fix overflow when no screens for current role --- packages/builder/src/builderStore/index.js | 2 +- .../NavigationPanel/ComponentNavigationTree/index.svelte | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/builderStore/index.js b/packages/builder/src/builderStore/index.js index 504f33861b..619bdd94a1 100644 --- a/packages/builder/src/builderStore/index.js +++ b/packages/builder/src/builderStore/index.js @@ -33,7 +33,7 @@ export const selectedComponentPath = derived( [store, currentAsset], ([$store, $currentAsset]) => { return findComponentPath( - $currentAsset.props, + $currentAsset?.props, $store.selectedComponentId ).map(component => component._id) } diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte index 187a8da98e..1c108f164e 100644 --- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte @@ -55,11 +55,10 @@ } -
+
{#each paths as path, idx (path)} 0} {path} route={routes[path]} /> {/each} - {#if !paths.length}
There aren't any screens configured with this access role. @@ -68,7 +67,7 @@