Missing null guard in deepEqual
Closed this issue · 5 comments
alecmev commented
objectEqual
throws when passed a null
. That, in turn, can happen because, unfortunately, typeof null === 'object'
, so none of the preceding checks in deepEqual
are able to filter it out. A typeof
wrapper could probably suffice (returning 'null'
for x === null
, and typeof x
otherwise).
kube commented
Thanks for the report!
This deepEqual function needs rework, I will take a look tomorrow.
alecmev commented
Thank you! Can you cut a release, please?
kube commented
Yes sorry totally forgot. I do that at noon.
kube commented
@jeremejevs Released on NPM.
alecmev commented
Thanks!