Merge pull request #575 from rachel-fenichel/bugfix/is_finite

Fix #571
This commit is contained in:
rachel-fenichel 2016-08-25 09:55:07 -07:00 committed by GitHub
commit b8651e1597

View file

@ -92,7 +92,7 @@ Blockly.FieldNumber.prototype.classValidator = function(text) {
return null;
}
// Round to nearest multiple of precision.
if (this.precision_ && Number.isFinite(n)) {
if (this.precision_ && isFinite(n)) {
n = Math.round(n / this.precision_) * this.precision_;
}
// Get the value in range.