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

panel: defensive coding that fixes #15563
This commit is contained in:
Torkel Ödegaard 2019-02-22 09:00:41 +01:00 committed by GitHub
commit ed06f04899
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}