Ensure empty values default to an empty string when null

This commit is contained in:
Dean 2025-01-30 11:56:26 +00:00
parent 352516a8b4
commit 942ba78f16
1 changed files with 3 additions and 2 deletions

View File

@ -360,7 +360,7 @@
{#if mode === BindingMode.Text}
{#key hbsCompletions}
<CodeEditor
value={hbsValue}
value={hbsValue || ""}
on:change={onChangeHBSValue}
bind:getCaretPosition
bind:insertAtPos
@ -372,9 +372,10 @@
/>
{/key}
{:else if mode === BindingMode.JavaScript}
Binding panel {jsValue}
{#key jsCompletions}
<CodeEditor
value={jsValue ? decodeJSBinding(jsValue) : jsValue}
value={jsValue ? decodeJSBinding(jsValue) : ""}
on:change={onChangeJSValue}
completions={jsCompletions}
mode={EditorModes.JS}