فهرست منبع

panels: fix loading panels with non-array targets

Alexander Zobnin 6 سال پیش
والد
کامیت
e3b3b35dca
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  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();
         }