Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Commit

Permalink
small clean up for style and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
iori-yja committed Sep 13, 2019
1 parent 2b47e9f commit 08d2ae3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/local/dashboards.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const logger = new Logger('dashboards');
const dashDir = 'dashboards';

function Dashboards() {
this.schemaVersion = 0;
this.schemaVersion = 0;
this.rows = new Rows();
this.panels = new Panels();
this.tempVars = new TempVars();
Expand Down Expand Up @@ -188,9 +188,10 @@ Dashboards.prototype.readDashboard = function(slug, folder) {
if (localfs.checkExists(getDashboardFile(slug, folder))) {
let dashboard = JSON.parse(localfs.readFile(getDashboardFile(slug, folder)));
if (dashboard.schemaVersion < 16) {
// this dashboard is from non-GridLayout era
// this dashboard is from non-GridLayout era; wizzy needs to assign global ids for panels
return sanitizePanels(dashboard);
} else {
// GridLayout's panels have global ids by their nature
return dashboard;
}
}
Expand Down

0 comments on commit 08d2ae3

Please sign in to comment.