We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9b00b02 + 28c80b8 commit 82b75d6Copy full SHA for 82b75d6
src/utils/isPlainObject.js
@@ -1,4 +1,5 @@
1
var fnToString = (fn) => Function.prototype.toString.call(fn);
2
+var objStringValue = fnToString(Object);
3
4
/**
5
* @param {any} obj The object to inspect.
@@ -19,5 +20,5 @@ export default function isPlainObject(obj) {
19
20
21
return typeof constructor === 'function'
22
&& constructor instanceof constructor
- && fnToString(constructor) === fnToString(Object);
23
+ && fnToString(constructor) === objStringValue;
24
}
0 commit comments