You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Ahh. This may have been a time thing, those validation checks have probably changed over time, and Winterfell hasn't kept up with that. I'll do some digging on this, and work out what the best validation check is.
I was going to submit a PR, but the handful of things I tried didn't work. I'm not too clear on how React's object hierarchy works under the hood, unfortunately. I've mostly left Javascript for Clojurescript these days, so my esoteric knowledge about Js prototype stuff is dwindling...
Pass in anything that's not a React Component to
addInputType
, and no exceptions will be thrown.One issue is that
!
has higher precedence thaninstanceof
. So, inaddInputType
, the line:!React.Component instanceof instance.constructor
is actually negating
React.Component
, not the result of theinstanceof
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.The text was updated successfully, but these errors were encountered: