1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00

Merge pull request #293 from mjashanks/master

bugfix: input value handles undefined/null
This commit is contained in:
Michael Shanks 2020-06-02 14:51:57 +01:00 committed by GitHub
commit 6787fa2053
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@
onChange(value)
}
$: displayValue = suffix && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : value
$: displayValue = suffix && value && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : (value || "")
</script>