diff --git a/packages/fbjs/src/misc/getByPath.js b/packages/fbjs/src/misc/getByPath.js index 79037692..f35c4d8e 100644 --- a/packages/fbjs/src/misc/getByPath.js +++ b/packages/fbjs/src/misc/getByPath.js @@ -42,7 +42,7 @@ function getByPath( const segment = path[i]; // Use 'in' to check entire prototype chain since immutable js records // use prototypes - if (current && segment in current) { + if (typeof(current) == "object" && segment in current) { current = current[segment]; } else { return fallbackValue;