Browse Source

Merge pull request #15570 from grafana/15563-plugin-text-mode

panel: defensive coding that fixes #15563
Torkel Ödegaard 6 years ago
parent
commit
ed06f04899
1 changed files with 1 additions and 1 deletions
  1. 1 1
      public/app/features/panel/query_editor_row.ts

+ 1 - 1
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);
     }