Update manifest 'dependsOn' logic to correctly handle boolean values

This commit is contained in:
Andrew Kingston 2021-12-08 13:06:36 +00:00
parent f2445226d5
commit 0e1879c6cc
1 changed files with 8 additions and 1 deletions

View File

@ -63,7 +63,14 @@
// If no specific value is depended upon, check if a value exists at all // If no specific value is depended upon, check if a value exists at all
// for the dependent setting // for the dependent setting
if (dependantValue == null) { 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 // Otherwise check the value matches