Coerce empty input value to empty string

pull/3570/head
Sander Hahn 6 years ago
parent 14a46a17d0
commit 6d4b652456

@ -180,7 +180,10 @@ export function set_data(text, data) {
} }
export function set_input_value(input, value) { export function set_input_value(input, value) {
if (value != null || input.value) { if (value === null || value === undefined) {
value = "";
}
if (input.value !== value) {
input.value = value; input.value = value;
} }
} }
@ -301,4 +304,4 @@ export class HtmlTag {
d() { d() {
this.n.forEach(detach); this.n.forEach(detach);
} }
} }

Loading…
Cancel
Save