diff --git a/front/core/components/input-number/index.js b/front/core/components/input-number/index.js index 2e4e73c29..19c28a63d 100644 --- a/front/core/components/input-number/index.js +++ b/front/core/components/input-number/index.js @@ -44,11 +44,12 @@ export default class InputNumber extends Input { * @param {Number} value - Value */ set value(value) { - if (!this.hasOwnProperty('_value') && value) + this.hasValue = !(value === null || value === undefined || value === ''); + + if (!this.hasOwnProperty('_value') && this.hasValue) this.input.value = value; this._value = value; - this.hasValue = !(value === null || value === undefined || value === ''); if (this.hasValue) this.element.classList.add('not-empty');