diff --git a/public/app/features/panel/query_editor_row.ts b/public/app/features/panel/query_editor_row.ts index fa25ce832be..3c44fab4db3 100644 --- a/public/app/features/panel/query_editor_row.ts +++ b/public/app/features/panel/query_editor_row.ts @@ -14,7 +14,7 @@ export class QueryRowCtrl { this.target = this.queryCtrl.target; this.panel = this.panelCtrl.panel; - if (this.hasTextEditMode) { + if (this.hasTextEditMode && this.queryCtrl.toggleEditorMode) { // expose this function to react parent component this.panelCtrl.toggleEditorMode = this.queryCtrl.toggleEditorMode.bind(this.queryCtrl); }