Commit a540f053 by Shavonn Brown Committed by Torkel Ödegaard

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

parent 66f73981
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment