From cb86d3718b4aa926ff7c6eeaff1f55f63c34aa6e Mon Sep 17 00:00:00 2001 From: Richard Ng Date: Fri, 5 Jul 2019 08:36:12 +0100 Subject: [PATCH] make sure branch is a plain object --- src/actions/for/actionsFor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions/for/actionsFor.js b/src/actions/for/actionsFor.js index 17337e4a..aea2afe0 100644 --- a/src/actions/for/actionsFor.js +++ b/src/actions/for/actionsFor.js @@ -80,7 +80,7 @@ const createFor = (stateShape, customReducers, pathToLeafOrBranch = []) => { const isBranch = leafOrBranch => ( (!Array.isArray(leafOrBranch) - && typeof leafOrBranch === "object" + && RA.isPlainObj(leafOrBranch) && Object.values(leafOrBranch).length >= 1) )