Skip to content

Commit 4d5c20d

Browse files
committed
fix: issue with setting raw value of 0 returning empty string
1 parent 0fadc40 commit 4d5c20d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/finput.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ class Finput {
7676

7777
public setRawValue(val: any) {
7878
let value: string;
79-
if (!val) {
80-
value = "";
81-
} else if (typeof val === "number" && !isNaN(val)) {
79+
if (typeof val === "number" && !isNaN(val)) {
8280
value = helpers.rawToFormatted(val, this.options);
8381
} else if (typeof val === "string") {
8482
value = val;
83+
} else if (!val) {
84+
value = "";
8585
} else {
8686
return;
8787
}

0 commit comments

Comments
 (0)