diff --git a/core/field_number.js b/core/field_number.js index 396cac7f5..be5ac735d 100644 --- a/core/field_number.js +++ b/core/field_number.js @@ -274,6 +274,8 @@ Blockly.FieldNumber.prototype.doClassValidation_ = function(opt_newValue) { newValue = newValue.replace(/O/ig, '0'); // Strip out thousands separators. newValue = newValue.replace(/,/g, ''); + // Ignore case of 'Infinity'. + newValue = newValue.replace(/infinity/i, 'Infinity'); // Clean up number. var n = Number(newValue || 0);