Skip to content

Commit e7c1c7e

Browse files
committed
isPlainObject early return upd
1 parent 80c44be commit e7c1c7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/isPlainObject.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @returns True if the argument appears to be a plain object.
44
*/
55
export default function isPlainObject(obj: any): boolean {
6-
if (!obj) return false
6+
if (typeof obj !== 'object' || obj === null) return false
77

88
const proto = obj.__proto__
99
return !proto || !Object.getPrototypeOf(proto)

0 commit comments

Comments
 (0)