1
0
Fork 0
mirror of synced 2024-09-09 22:16:26 +12:00

Small tweak to JS bindings

This commit is contained in:
Andrew Kingston 2024-05-22 10:45:03 +01:00
parent 41ab3685be
commit 3cf3dd3afa

View file

@ -236,11 +236,12 @@
}
const onChangeJSValue = e => {
jsValue = encodeJSBinding(e.detail)
if (!e.detail?.trim()) {
// Don't bother saving empty values as JS
updateValue("")
updateValue(null)
} else {
updateValue(encodeJSBinding(e.detail))
updateValue(jsValue)
}
}