Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 7efde9f

Browse files
committed
Do not use "in" operator on non-object types. Fixes #514
1 parent 4c101ae commit 7efde9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/get-from-immutable-state.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function immutableGetFromState(state, modelString) {
77
if (!subState || typeof subState === 'string') return subState;
88

99
// Current subState is immutable
10-
if ('get' in subState) {
10+
if (typeof subState === 'object' && 'get' in subState) {
1111
return subState.get(subPath);
1212
}
1313

0 commit comments

Comments
 (0)