From 39d5c81b72ab3f6fee18139cb399c4416f38eaf7 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 3 Dec 2021 11:45:04 +0000 Subject: [PATCH] Ensure links are an array in the wrapper component for a cleaner fix --- .../PropertyControls/NavigationEditor/NavigationDrawer.svelte | 1 - .../PropertyControls/NavigationEditor/NavigationEditor.svelte | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationDrawer.svelte index 4301028ba0..4d1823108c 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationDrawer.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationDrawer.svelte @@ -17,7 +17,6 @@ const flipDurationMs = 150 let dragDisabled = true - $: links = links || [] $: links.forEach(link => { if (!link.id) { link.id = generate() diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationEditor.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationEditor.svelte index ea02b4184d..40357f50be 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationEditor.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/NavigationEditor/NavigationEditor.svelte @@ -6,7 +6,7 @@ export let value = [] let drawer - let links = cloneDeep(value) + let links = cloneDeep(value || []) const dispatch = createEventDispatcher() const save = () => {