Skip to content

Commit

Permalink
fixed offline version (avoid sessionStorage access)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoenig committed Nov 29, 2018
1 parent 2e04342 commit 79de770
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## v4.2.2.9
### 2018-11-29
* GUI: prepared release
* GUI: fixed offline version (avoid sessionStorage access)

### 2018-11-28
* Objects: added special checks to make imporing text-based files into vars easier in Windows
Expand Down
14 changes: 8 additions & 6 deletions src/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,14 @@ IDE_Morph.prototype.openIn = function (world) {
}
}

if (!sessionStorage.username) {
// check whether login should persist across browser sessions
this.cloud.initSession(initUser);
} else {
// login only persistent during a single browser session
this.cloud.checkCredentials(initUser);
if (location.protocol !== 'file:') {
if (!sessionStorage.username) {
// check whether login should persist across browser sessions
this.cloud.initSession(initUser);
} else {
// login only persistent during a single browser session
this.cloud.checkCredentials(initUser);
}
}

this.buildPanes();
Expand Down

0 comments on commit 79de770

Please sign in to comment.