Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid undefined values on StyleSheet #6

Merged
merged 1 commit into from
Mar 9, 2017

Conversation

gabriel-laet
Copy link
Contributor

Only noticed this behavior on Android - but if for some reason, parser returns undefined
values for an attribute (like a non-supported selector, such as :after and :before), React Native
will throw an error inside StyleSheet.create saying Object.freeze can only be used with objects. On iOS,
this error does not occur.

Ideally this fix would make sure we never get undefined values at this point, but here's a quick fix
that will avoid this error.

Only noticed this behavior on Android - but if for some reason, parser returns `undefined`
values for an attribute (like a non-supported selector, such as `:after` and `:before`), React Native
will throw an error inside `StyleSheet.create` saying `Object.freeze` can only be used with objects. On iOS,
this error does not occur.

Ideally this fix would make sure we never get `undefined` values at this point, but here's a quick fix
that will avoid this error.
@jspears jspears merged commit 594c0f3 into jspears:master Mar 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