Explorar el Código

panels: fix loading panels with non-array targets

Alexander Zobnin hace 6 años
padre
commit
e3b3b35dca
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      public/app/features/dashboard/state/PanelModel.ts

+ 2 - 1
public/app/features/dashboard/state/PanelModel.ts

@@ -126,7 +126,8 @@ export class PanelModel {
 
   ensureQueryIds() {
     if (this.targets) {
-      for (const query of this.targets) {
+      for (let i = 0; i < this.targets.length; i++) {
+        const query = this.targets[i];
         if (!query.refId) {
           query.refId = this.getNextQueryLetter();
         }