Skip to content

Commit be77761

Browse files
authored
Replace isPlainObject with unmodified version from Redux
1 parent 38a231b commit be77761

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/utils/isPlainObject.js

+9-11
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
* @returns {boolean} True if the argument appears to be a plain object.
44
*/
55
export default function isPlainObject(obj) {
6-
if (typeof obj !== 'object' || obj === null) return false
7-
8-
let prototypeOfObj = Object.getPrototypeOf(obj)
9-
let proto = obj
10-
while (Object.getPrototypeOf(proto) !== null) {
11-
proto = Object.getPrototypeOf(proto)
12-
13-
}
14-
15-
return prototypeOfObj === proto
16-
}
6+
if (typeof obj !== 'object' || obj === null) return false
7+
8+
let proto = obj
9+
while (Object.getPrototypeOf(proto) !== null) {
10+
proto = Object.getPrototypeOf(proto)
11+
}
12+
13+
return Object.getPrototypeOf(obj) === proto
14+
}

0 commit comments

Comments
 (0)