Fixes: Requested keys of a value that is not an object.#143
Fixes: Requested keys of a value that is not an object.#143ryanbrainard merged 7 commits intoheroku:masterfrom
Conversation
Requested keys of a value that is not an object. in shallowEqual
|
removed extra semicolon. |
|
@nfcampos you did a lot of the work on shallow comparisons. See anything this would break? Either way, some tests should be added. |
| } | ||
|
|
||
| if (objA === undefined || objB === undefined) { | ||
| if (objA === undefined || objB === undefined || |
There was a problem hiding this comment.
if objA is undefined then typeof objA won't be 'object' so there's no need to check for both, just remove the === undefined check
|
seems fine other than my comment |
|
Good point. On Friday, August 5, 2016, Nuno Campos notifications@github.com wrote:
|
|
@ryanbrainard @nfcampos I have updated the code removed undefined check and added few test cases for null and undefined check. Let me know if I can help in any other way. |
Requested keys of a value that is not an object. in shallowEqual
|
Thanks! |
Recently I was trying hands on React native and while using this util found the below error. I have tried to fix in this pull request. It adds some extra checks before doing shallowEqual.