flitbit / diff

Javascript utility for calculating deep difference, capturing changes, and applying changes across objects; for nodejs and the browser.
MIT License
2.99k stars 213 forks source link

0.3.8 breaks when diffing between an object and null value #106

Closed leslc closed 6 years ago

leslc commented 7 years ago

Reporting an issue.

In 0.3.6, it was possible to diff an object against a null without throwing an error. In 0.3.8, we get an error:

"Cannot read property 'lhs' of undefined" at deepDiff (deep-diff/index.js:156:76)

fysidm commented 7 years ago

Actually, it will crash when lhs or rhs is undefined and just in unix-based OS. Windows works fine. XD

OliverJAsh commented 6 years ago

Also happens when comparing with undefined:

TypeError: Cannot read property 'rhs' of undefined