Skip to content

Warning for: PropTypes.object.isRequired when prop is null #3163

@TrySpace

Description

@TrySpace

As PropTypes is about the 'type' of prop, null is an empty object, but still a type of object, practically.

But still it warns:

 Warning: Required prop `profile` was not specified in `Element`. Check the render method of `OtherElement`.

I don't think this is supposed to happen.

It stops warning after it is not null anymore. I'm pretty sure it should only warn when it is undefined ?

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