1
0
Fork 0
mirror of synced 2024-09-17 09:49:11 +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 => { const onChangeJSValue = e => {
jsValue = encodeJSBinding(e.detail)
if (!e.detail?.trim()) { if (!e.detail?.trim()) {
// Don't bother saving empty values as JS // Don't bother saving empty values as JS
updateValue("") updateValue(null)
} else { } else {
updateValue(encodeJSBinding(e.detail)) updateValue(jsValue)
} }
} }