Closed goce-cz closed 3 years ago
When one of the arguments passed to isShallowEqual is null and the other one is plain object, the function throws:
isShallowEqual
null
TypeError: Cannot use 'in' operator to search for 'width' in null
The reason is that typeof null === 'object' and the function then tries comparing the two property by property.
typeof null === 'object'
When one of the arguments passed to
isShallowEqual
isnull
and the other one is plain object, the function throws:The reason is that
typeof null === 'object'
and the function then tries comparing the two property by property.