diff icon indicating copy to clipboard operation
diff copied to clipboard

diff does not return 'path' key

Open markatango opened this issue 4 years ago • 1 comments

Documentation says: `v 0.2.0 and above The code snippet above would result in the following structure describing the differences:

[ { kind: 'E', path: [ 'name' ], lhs: 'my object', rhs: 'updated object' }, ... But path` key is actually not present in the result.

markatango avatar Mar 29 '22 19:03 markatango

Apparently, deep-diff returns a 'D' type and path element if rhs is {}. But it returns an 'E" type and no path element if rhs is null. I think rhs is null should also return a 'D' type with path element. If lhs is {} d-d returns 'N' type with path element. But, if lhs is null, d-d also returns an 'E' type with no path element. Should be 'N' type with path.

markatango avatar Mar 30 '22 00:03 markatango