Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Commit

Permalink
fix: use navigator online to grant offline login
Browse files Browse the repository at this point in the history
Sometimes seeing different response statuses here (e.g. 500, though I'm not sure
why). Revert to using naive `navigator.onLine` instead for offline login.

Closes #13.
  • Loading branch information
tlvince authored and patriciagarcia committed Oct 5, 2016
1 parent 6cb9303 commit 4e012ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/login.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class LoginService {
.then(remoteSession => isValidSession(localSession, remoteSession))
.then(() => this.init(localSession))
.catch(err => {
if (angular.isObject(err) && err.status === 0) {
if (!this.$window.navigator.onLine) {
// User looks to be offline, grant login
return this.init(localSession)
}
Expand Down

0 comments on commit 4e012ef

Please sign in to comment.