From a540f053301f7efa92c9b2fe89eb27d1adb10d96 Mon Sep 17 00:00:00 2001 From: Shavonn Brown Date: Mon, 26 Aug 2019 12:28:43 -0400 Subject: [PATCH] QueryEditor: check if optional func toggleEditorMode is provided (#18705) --- public/app/features/explore/QueryEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/explore/QueryEditor.tsx b/public/app/features/explore/QueryEditor.tsx index 2f689409179..de8706b0a21 100644 --- a/public/app/features/explore/QueryEditor.tsx +++ b/public/app/features/explore/QueryEditor.tsx @@ -73,7 +73,7 @@ export default class QueryEditor extends PureComponent { const hasNewError = prevProps.error !== this.props.error; if (this.component) { - if (hasToggledEditorMode) { + if (hasToggledEditorMode && this.angularScope && this.angularScope.toggleEditorMode) { this.angularScope.toggleEditorMode(); }