Use isFinite instead of Number.isFinite

This commit is contained in:
Rachel Fenichel 2016-08-19 15:04:07 -07:00
parent 21fea1279c
commit a74acd942e

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.