mirror of https://github.com/grafana/grafana.git
				
				
				
			panels: fix loading panels with non-array targets (refactor)
This commit is contained in:
		
							parent
							
								
									e3b3b35dca
								
							
						
					
					
						commit
						fe798239b2
					
				| 
						 | 
					@ -125,9 +125,8 @@ export class PanelModel {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ensureQueryIds() {
 | 
					  ensureQueryIds() {
 | 
				
			||||||
    if (this.targets) {
 | 
					    if (this.targets && _.isArray(this.targets)) {
 | 
				
			||||||
      for (let i = 0; i < this.targets.length; i++) {
 | 
					      for (const query of this.targets) {
 | 
				
			||||||
        const query = this.targets[i];
 | 
					 | 
				
			||||||
        if (!query.refId) {
 | 
					        if (!query.refId) {
 | 
				
			||||||
          query.refId = this.getNextQueryLetter();
 | 
					          query.refId = this.getNextQueryLetter();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue