From 465a240e879aae9f59504608cfe353bfd4a8b534 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 9 Feb 2021 10:49:22 +0000 Subject: [PATCH] Use real component name in deletion confirmation modal --- .../design/NavigationPanel/ComponentDropdownMenu.svelte | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte index a027beab18..750ccef872 100644 --- a/packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte @@ -13,9 +13,8 @@ let dropdown let anchor - $: noChildrenAllowed = - !component || - !store.actions.components.getDefinition(component._component)?.hasChildren + $: definition = store.actions.components.getDefinition(component?._component) + $: noChildrenAllowed = !component || !definition?.hasChildren $: noPaste = !$store.componentToPaste const lastPartOfName = c => (c ? last(c._component.split("/")) : "") @@ -130,7 +129,7 @@