Closed danbeam closed 7 months ago
Minimal repro:
diffJson(Object.assign(Object.create(null), {a: 123}), {b: 456});
With an error like:
/.../node_modules/diff/src/diff/json.js:68 if (obj.hasOwnProperty(key)) { ^ TypeError: obj.hasOwnProperty is not a function
As far as I can tell, some popular libraries export object with these setups (e.g. eslint and express). I believe I have a simple fix.
eslint
express
Minimal repro:
With an error like:
As far as I can tell, some popular libraries export object with these setups (e.g.
eslint
andexpress
). I believe I have a simple fix.