From ba6aceb096a34cd95c68435ee282928d2a9b8ca0 Mon Sep 17 00:00:00 2001 From: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com> Date: Wed, 4 Nov 2020 15:27:11 +0530 Subject: [PATCH] Fix includes is not a function error crash (#1555) * Make the value a string to avoid includes is not a function error * If it is not a string show the prompt --- .../src/components/editorComponents/CodeEditor/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/client/src/components/editorComponents/CodeEditor/index.tsx b/app/client/src/components/editorComponents/CodeEditor/index.tsx index c3fb0a30f2..bdd0f0ba2b 100644 --- a/app/client/src/components/editorComponents/CodeEditor/index.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/index.tsx @@ -292,8 +292,9 @@ class CodeEditor extends Component { ("dataTreePath" in this.props && !!this.props.dataTreePath)); const showBindingPrompt = - (!this.props.input.value?.includes("{{") || !this.props.input.value) && - showEvaluatedValue; + !_.isString(this.props.input.value) || + ((!this.props.input.value?.includes("{{") || !this.props.input.value) && + showEvaluatedValue); return (