-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
FieldNumber interprets null min/max as 0. #3177
Labels
Milestone
Comments
RoboErikG
added a commit
to RoboErikG/blockly
that referenced
this issue
Oct 7, 2019
null was being converted to 0 by Number() when it should cause the default value to be set instead. This updates FieldNumber to handle nulls correctly. Fixes google#3177
3 tasks
RoboErikG
added a commit
to RoboErikG/blockly
that referenced
this issue
Oct 7, 2019
null was being converted to 0 by Number() when it should cause the default value to be set instead. This updates FieldNumber to handle nulls correctly. Also update jsdoc. Fixes google#3177
RoboErikG
added a commit
to RoboErikG/blockly
that referenced
this issue
Oct 7, 2019
null was being converted to 0 by Number() when it should cause the default value to be set instead. This updates FieldNumber and FieldAngle to handle nulls correctly. Also update jsdoc. Fixes google#3177
RoboErikG
added a commit
that referenced
this issue
Oct 7, 2019
null was being converted to 0 by Number() when it should cause the default value to be set instead. This updates FieldNumber and FieldAngle to handle nulls correctly. Also update jsdoc. Fixes #3177
RoboErikG
added a commit
to RoboErikG/blockly
that referenced
this issue
Oct 8, 2019
null was being converted to 0 by Number() when it should cause the default value to be set instead. This updates FieldNumber and FieldAngle to handle nulls correctly. Also update jsdoc. Fixes google#3177
3 tasks
RoboErikG
added a commit
that referenced
this issue
Oct 8, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Converting to Number(value) in FieldNumber had the effect of causing nulls passed to the constructor for min/max to be interpreted as 0. We need to explicitly check for null and set them to +/- infinity as appropriate.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
value gets rounded to the nearest 10
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Stack Traces
Additional context
The text was updated successfully, but these errors were encountered: