Skip to content

Conversation

@vhoen
Copy link
Contributor

@vhoen vhoen commented Aug 9, 2017

Prevent this crash :

com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type `int64', but had type `null'
        at com.facebook.react.bridge.ReadableNativeMap.getInt(Native Method)

when using one of the latest release.

Copy link
Collaborator

@mrdezzods mrdezzods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PropTypes.object is better than any, no?

@vhoen
Copy link
Contributor Author

vhoen commented Aug 9, 2017

Yes, you are right. Even better I used :

PropTypes.oneOfType([
  PropTypes.object,
  PropTypes.number,
])

To support both object and Stylesheet

@mrdezzods mrdezzods merged commit 9d22821 into leecade:master Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants