QueryEditor: check if optional func toggleEditorMode is provided (#18705)

This commit is contained in:
Shavonn Brown
2019-08-26 18:28:43 +02:00
committed by Torkel Ödegaard
parent 66f739815b
commit a540f05330
+1 -1
View File
@@ -73,7 +73,7 @@ export default class QueryEditor extends PureComponent<QueryEditorProps, any> {
const hasNewError = prevProps.error !== this.props.error;
if (this.component) {
if (hasToggledEditorMode) {
if (hasToggledEditorMode && this.angularScope && this.angularScope.toggleEditorMode) {
this.angularScope.toggleEditorMode();
}