From 0e1879c6cc804d9b7deadc8e5a3176f0f8002d9d Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 8 Dec 2021 13:06:36 +0000 Subject: [PATCH] Update manifest 'dependsOn' logic to correctly handle boolean values --- .../PropertiesPanel/ComponentSettingsSection.svelte | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte b/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte index 34d86c9a08..47df3dbf74 100644 --- a/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte @@ -63,7 +63,14 @@ // If no specific value is depended upon, check if a value exists at all // for the dependent setting if (dependantValue == null) { - return !isEmpty(componentInstance[dependantSetting]) + const currentValue = componentInstance[dependantSetting] + if (currentValue === false) { + return false + } + if (currentValue === true) { + return true + } + return !isEmpty(currentValue) } // Otherwise check the value matches