diff --git a/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte b/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte index 88661467be..5d9b84fde5 100644 --- a/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte +++ b/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte @@ -47,7 +47,6 @@ export let label export let completions = [] - export let resize = "none" export let mode = EditorModes.Handlebars export let value = "" export let placeholder = null @@ -55,6 +54,8 @@ export let autofocus = false export let jsBindingWrapping = true + const dispatch = createEventDispatcher() + // Export a function to expose caret position export const getCaretPosition = () => { const selection_range = editor.state.selection.ranges[0] @@ -106,8 +107,6 @@ } ) - const dispatch = createEventDispatcher() - // Theming! let currentTheme = $themeStore?.theme let isDark = !currentTheme.includes("light") diff --git a/packages/builder/src/components/common/CodeEditor/index.js b/packages/builder/src/components/common/CodeEditor/index.js index bd55c371e6..c104267aa4 100644 --- a/packages/builder/src/components/common/CodeEditor/index.js +++ b/packages/builder/src/components/common/CodeEditor/index.js @@ -163,26 +163,12 @@ export const jsAutocomplete = baseCompletions => { } export const buildBindingInfoNode = (completion, binding) => { + if (!binding.valueHTML || binding.value == null) { + return null + } const ele = document.createElement("div") ele.classList.add("info-bubble") - - if (binding.value != null && binding.valueHTML) { - ele.innerHTML = `
{getReadableBindingLabel(hoverTarget.binding)}- {/if} {#if hoverTarget.description}