mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
Use isFinite instead of Number.isFinite
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user