Skip to content

[email protected]: Empty object check error #4632

@zhe-he

Description

@zhe-he

https://github.com/reduxjs/redux/blob/0e8a7b00db58796f7a7adef6ac9ebed9420c18cb/src/utils/isPlainObject.ts#L5C1-L14C2
image

I just upgraded the package to @reduxjs/[email protected] and [email protected] today, and then I found that the console reported an error, A non-serializable value was detected in the state, in the path. Finally, I found that it was because the object I created through Object.create(null) did not pass the isPlainObject function check. I want to know if this is correct, um... Do not want users to use objects created by Object.create(null) or is this function check not comprehensive enough?

console.log( {} ) // true
console.log( isPlainObject(Object.create(null)) ) // false ???

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions