Fix row.toggleExpanded(bool) (#1732)

The wrong variable was being checked against `undefined`, so the row was
always being toggled, rather than taking the parameter into account.
This commit is contained in:
Bart Nagel 2019-12-06 19:39:45 -08:00 committed by Tanner Linsley
parent 2955335df1
commit 8dc6559e64

View File

@ -42,7 +42,7 @@ function reducer(state, action) {
const { path, expanded } = action
const key = path.join('.')
const exists = state.expanded.includes(key)
const shouldExist = typeof set !== 'undefined' ? expanded : !exists
const shouldExist = typeof expanded !== 'undefined' ? expanded : !exists
let newExpanded = new Set(state.expanded)
if (!exists && shouldExist) {