fix some issues with trees

This commit is contained in:
Henry Jameson 2022-03-29 19:23:30 +03:00
parent a1822f073d
commit e1483488c7
2 changed files with 2 additions and 2 deletions

View File

@ -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
}, {})

View File

@ -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
}, {})