From a9527f3e49ff81a13824d19ade785b69cf574686 Mon Sep 17 00:00:00 2001 From: Favour Ohanekwu Date: Wed, 1 Dec 2021 04:50:15 +0100 Subject: [PATCH] update ternserver when no custom def is available (#9472) --- .../src/components/editorComponents/CodeEditor/hintHelpers.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/client/src/components/editorComponents/CodeEditor/hintHelpers.ts b/app/client/src/components/editorComponents/CodeEditor/hintHelpers.ts index e37ea7b591..d1ecf40019 100644 --- a/app/client/src/components/editorComponents/CodeEditor/hintHelpers.ts +++ b/app/client/src/components/editorComponents/CodeEditor/hintHelpers.ts @@ -11,6 +11,8 @@ export const bindingHint: HintHelper = (editor, dataTree, customDataTree) => { if (customDataTree) { const customTreeDef = customTreeTypeDefCreator(customDataTree); TernServer.updateDef("customDataTree", customTreeDef); + } else { + TernServer.updateDef("customDataTree", {}); } editor.setOption("extraKeys", {