Skip to content

Commit

Permalink
isPlainObject early return upd
Browse files Browse the repository at this point in the history
  • Loading branch information
lioeaet committed Apr 1, 2023
1 parent 80c44be commit e7c1c7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/isPlainObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @returns True if the argument appears to be a plain object.
*/
export default function isPlainObject(obj: any): boolean {
if (!obj) return false
if (typeof obj !== 'object' || obj === null) return false

const proto = obj.__proto__
return !proto || !Object.getPrototypeOf(proto)
Expand Down

0 comments on commit e7c1c7e

Please sign in to comment.