Преглед изворни кода

fix(dashlist): avoid null ref errors

bergquist пре 9 година
родитељ
комит
c6768a93c8
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      public/app/features/dashboard/impression_store.ts

+ 2 - 2
public/app/features/dashboard/impression_store.ts

@@ -31,8 +31,8 @@ export class ImpressionsStore {
   }
   }
 
 
   getDashboardOpened() {
   getDashboardOpened() {
-    var k = store.get("dashboard_impressions");
-    return JSON.parse(k);
+    var impressions = store.get("dashboard_impressions");
+    return JSON.parse(impressions || "[]");
   }
   }
 }
 }