Skip to content

Commit 997946b

Browse files
authored
Merge pull request #5411 from plotly/revisit-isPlainObject
Revise second condition in is_plain_object
2 parents d430b84 + 9af3504 commit 997946b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/is_plain_object.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ module.exports = function isPlainObject(obj) {
2121

2222
return (
2323
Object.prototype.toString.call(obj) === '[object Object]' &&
24-
Object.getPrototypeOf(obj) === Object.prototype
24+
Object.getPrototypeOf(obj).hasOwnProperty('hasOwnProperty')
2525
);
2626
};

0 commit comments

Comments
 (0)