From 8dc6559e64d6f54a2921ae3e9db18a9969b81e73 Mon Sep 17 00:00:00 2001 From: Bart Nagel Date: Fri, 6 Dec 2019 19:39:45 -0800 Subject: [PATCH] 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. --- src/plugin-hooks/useExpanded.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin-hooks/useExpanded.js b/src/plugin-hooks/useExpanded.js index bd783ed..1537b7d 100755 --- a/src/plugin-hooks/useExpanded.js +++ b/src/plugin-hooks/useExpanded.js @@ -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) {