-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Labels
Description
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.