-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Warn if style value is NaN #5773
Labels
Comments
NaN is a fine (if weird) value to pass so we should probably just handle it explicitly like we did for props in #3148. |
As per team discussion offline, we should warn on initial render (NaN indicates error) and also do as @zpao mentioned to avoid the mutation warning on update. |
Submitted #5811 as a fix. Thanks! |
This was referenced Jan 9, 2016
Fixed in #5811 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Passing a value of NaN as the value of a css style seems to indicate an error. Turns out that we don't warn on initial render, and give a confusing error on update (because
NaN != NaN
as per spec). Discovered in #4877 (comment)Anyway, we should probably warn if someone passes in
NaN
on initial render, and not warn on update if both previous/next values are NaN.The text was updated successfully, but these errors were encountered: