mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
panel: defensive coding that fixes #15563
If a plugin incorrectly uses an attribute in the query-editor-row directive, it should not throw an exception.
This commit is contained in:
parent
745fd68571
commit
bd0f55cbb8
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user