diff --git a/core/field_number.js b/core/field_number.js index cd773cb87..94cda5108 100644 --- a/core/field_number.js +++ b/core/field_number.js @@ -31,7 +31,7 @@ goog.require('goog.math'); /** * Class for an editable number field. - * @param {string} value The initial content of the field. + * @param {number|string} value The initial content of the field. * @param {number|string|undefined} opt_min Minimum value. * @param {number|string|undefined} opt_max Maximum value. * @param {number|string|undefined} opt_precision Precision for value. @@ -68,7 +68,7 @@ Blockly.FieldNumber.prototype.setConstraints = function(min, max, precision) { this.min_ = isNaN(min) ? -Infinity : min; max = parseFloat(max); this.max_ = isNaN(max) ? Infinity : max; - this.setValue(this.callValidator(this.getValue)); + this.setValue(this.callValidator(this.getValue())); }; /**