diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte
index dfd116fe35..2d51f3ef1f 100644
--- a/packages/builder/src/components/common/bindings/BindingPanel.svelte
+++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte
@@ -150,8 +150,9 @@
}
//Get the current mode value
- const currentEditorValue = mode === "JavaScript" ? jsValue : hbsValue
- if (currentEditorValue) {
+ const editorValue = usingJS ? decodeJSBinding(jsValue) : hbsValue
+
+ if (editorValue) {
targetMode = selectedMode
return false
}
@@ -168,7 +169,7 @@