We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94b31a8 commit 783de52Copy full SHA for 783de52
src/lib/is_plain_object.js
@@ -9,6 +9,8 @@
9
10
'use strict';
11
12
+var isNodeJS = window.name === 'nodejs';
13
+
14
// more info: http://stackoverflow.com/questions/18531624/isplainobject-thing
15
module.exports = function isPlainObject(obj) {
16
// We need to be a little less strict in the `imagetest` container because
@@ -21,6 +23,6 @@ module.exports = function isPlainObject(obj) {
21
23
22
24
return (
25
Object.prototype.toString.call(obj) === '[object Object]' &&
- Object.getPrototypeOf(obj) === Object.prototype
26
+ (isNodeJS || Object.getPrototypeOf(obj) === Object.prototype)
27
);
28
};
0 commit comments