Skip to content

Commit

Permalink
dont coerce all falsy values to empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed May 17, 2020
1 parent 6397588 commit 081f7cd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/runtime/internal/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ export function set_data(text, data) {
}

export function set_input_value(input, value) {
if (value != null || input.value) {
input.value = value || '';
}
input.value = value == null ? '' : value;
}

export function set_input_type(input, type) {
Expand Down

0 comments on commit 081f7cd

Please sign in to comment.