Skip to content

Commit

Permalink
Fixes a bug that caused a blank screen if the user configuration is n…
Browse files Browse the repository at this point in the history
…ot available in the localStorage
  • Loading branch information
cheton committed Mar 22, 2017
1 parent abe5bb1 commit 62f8630
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/web/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const getUserConfig = () => {
}

let json = JSON.parse(value) || {};
cnc.version = json.version;
cnc.version = json.version || settings.version; // fallback to current version
cnc.state = json.state;
} catch (err) {
log.error(err);
Expand Down Expand Up @@ -285,6 +285,10 @@ const migrateStore = () => {
}
};

migrateStore();
try {
migrateStore();
} catch (err) {
log.error(err);
}

export default store;

0 comments on commit 62f8630

Please sign in to comment.