Skip to content

Commit 8166351

Browse files
authored
fix(isPlainObject): support check Object.create(null)
1 parent 0e8a7b0 commit 8166351

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/isPlainObject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ export default function isPlainObject(obj: any): obj is object {
1010
proto = Object.getPrototypeOf(proto)
1111
}
1212

13-
return Object.getPrototypeOf(obj) === proto
13+
return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null
1414
}

0 commit comments

Comments
 (0)