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
This commit is contained in:
akash-codemonk 2020-11-04 15:27:11 +05:30 committed by GitHub
parent ceb31edd76
commit ba6aceb096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -292,8 +292,9 @@ class CodeEditor extends Component<Props, State> {
("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 (
<DynamicAutocompleteInputWrapper