Commit f5346abe authored by Valentin Benozillo's avatar Valentin Benozillo

erp5_web_renderjs_ui: Fix min & max setup if undefined

Depending on field type, if min and max are not setup then they can be equals to the empty string or undefined.
parent 37b1ac6f
...@@ -95,10 +95,10 @@ ...@@ -95,10 +95,10 @@
if (this.state.maxlength) { if (this.state.maxlength) {
textarea.setAttribute('maxlength', this.state.maxlength); textarea.setAttribute('maxlength', this.state.maxlength);
} }
if (this.state.min !== "") { if (this.state.min && this.state.min !== "") {
textarea.setAttribute('min', this.state.min); textarea.setAttribute('min', this.state.min);
} }
if (this.state.max !== "") { if (this.state.max && this.state.max !== "") {
textarea.setAttribute('max', this.state.max); textarea.setAttribute('max', this.state.max);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment