Skip to content

Commit

Permalink
Merge pull request #5411 from plotly/revisit-isPlainObject
Browse files Browse the repository at this point in the history
Revise second condition in is_plain_object
  • Loading branch information
archmoj authored Jan 15, 2021
2 parents d430b84 + 9af3504 commit 997946b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/is_plain_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ module.exports = function isPlainObject(obj) {

return (
Object.prototype.toString.call(obj) === '[object Object]' &&
Object.getPrototypeOf(obj) === Object.prototype
Object.getPrototypeOf(obj).hasOwnProperty('hasOwnProperty')
);
};

0 comments on commit 997946b

Please sign in to comment.