From 2205223ce36aaa71872231ecde2e85312fcf92d6 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 10 Feb 2025 22:50:44 +0100 Subject: [PATCH] Fix --- .../builder/src/components/common/CodeEditor/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/common/CodeEditor/index.ts b/packages/builder/src/components/common/CodeEditor/index.ts index a750ca52a1..5675ba2968 100644 --- a/packages/builder/src/components/common/CodeEditor/index.ts +++ b/packages/builder/src/components/common/CodeEditor/index.ts @@ -130,8 +130,7 @@ export const snippetAutoComplete = (snippets: Snippet[]) => { return null } - let jsBinding = context.matchBefore(/\$\("[\s\w]*/) - if (jsBinding) { + if (context.matchBefore(/\$\("[\s\w]*/)) { // We are handing a js field completion return null } @@ -227,6 +226,11 @@ export const jsAutocomplete = (baseCompletions: BindingCompletion[]) => { export const jsHelperAutocomplete = (baseCompletions: BindingCompletion[]) => { async function coreCompletion(context: CompletionContext) { + if (context.matchBefore(/\$\("[\s\w]*/)) { + // We are handing a js field completion + return null + } + let jsBinding = context.matchBefore(/\bhelpers\.\w*/) if (jsBinding) {