mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #13133 from grafana/13132_query_variable
Fix error when new variables created but not yet added/saved
This commit is contained in:
commit
7c88436a9b
@ -122,12 +122,13 @@ export class VariableSrv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const g = this.createGraph();
|
const g = this.createGraph();
|
||||||
const promises = g
|
const node = g.getNode(variable.name);
|
||||||
.getNode(variable.name)
|
let promises = [];
|
||||||
.getOptimizedInputEdges()
|
if (node) {
|
||||||
.map(e => {
|
promises = node.getOptimizedInputEdges().map(e => {
|
||||||
return this.updateOptions(this.variables.find(v => v.name === e.inputNode.name));
|
return this.updateOptions(this.variables.find(v => v.name === e.inputNode.name));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return this.$q.all(promises).then(() => {
|
return this.$q.all(promises).then(() => {
|
||||||
if (emitChangeEvents) {
|
if (emitChangeEvents) {
|
||||||
|
Loading…
Reference in New Issue
Block a user