Skip to content

Invalid custom inputTypes are not rejected #108

@KingMob

Description

@KingMob

Pass in anything that's not a React Component to addInputType, and no exceptions will be thrown.

One issue is that ! has higher precedence than instanceof. So, in addInputType, the line:

!React.Component instanceof instance.constructor

is actually negating React.Component, not the result of the instanceof test.

However, wrapping it in parentheses like !(React.Component instanceof instance.constructor) doesn't fix the overall issue, so I think there's something wrong with the instanceof test, too.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions