commit: e1483488c7982daa9272c570f0a5a9296519ef31
parent a1822f073d50f101d55ecfe47b664b44f741cb38
Author: Henry Jameson <me@hjkos.com>
Date: Tue, 29 Mar 2022 19:23:30 +0300
fix some issues with trees
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/status/status.js b/src/components/status/status.js
@@ -69,7 +69,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => {
const controlledName = `controlled${camelized}`
const uncontrolledName = `uncontrolled${camelized}`
res[name] = function () {
- return (this.$props[toggle] && this[toggle]) ? this[controlledName] : this[uncontrolledName]
+ return (this.$props[toggle] !== undefined && this[toggle]) ? this[controlledName] : this[uncontrolledName]
}
return res
}, {})
diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js
@@ -31,7 +31,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => {
const controlledName = `controlled${camelized}`
const uncontrolledName = `uncontrolled${camelized}`
res[name] = function () {
- return (this.$props[toggle] && this[toggle]) ? this[controlledName] : this[uncontrolledName]
+ return (this.$props[toggle] !== undefined && this[toggle]) ? this[controlledName] : this[uncontrolledName]
}
return res
}, {})