Skip to content

Commit

Permalink
Don't alert about localStorage in electron browser
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed Jan 13, 2017
1 parent 578e62d commit 04a33aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ let willTransitionTo = (nextState, replaceState, callback) => {
}).catch( error => {
console.error("----- App.willTransitionTo error ----->", error, (new Error).stack);
if(error.name === "InvalidStateError") {
alert("Can't access local storage.\nPlease make sure your browser is not in private/incognito mode.");
if (__ELECTRON__) {
replaceState("/dashboard");
} else {
alert("Can't access local storage.\nPlease make sure your browser is not in private/incognito mode.");
}
} else {
replaceState("/init-error");
callback();
Expand Down

0 comments on commit 04a33aa

Please sign in to comment.