Skip to content

Commit

Permalink
Reject the promise when the popup is closed on Cordova
Browse files Browse the repository at this point in the history
fixes #838
  • Loading branch information
sahat committed Jul 18, 2016
1 parent 447d222 commit 8c9c1b5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
7 changes: 5 additions & 2 deletions dist/satellizer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/satellizer.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/satellizer.min.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions examples/client/vendor/satellizer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,13 @@ export default class Popup implements IPopup {
}
});

this.popup.addEventListener('loaderror', function() {
this.popup.addEventListener('loaderror', () => {
reject(new Error('Authorization failed'));
});

this.popup.addEventListener('exit', () => {
reject(new Error('The popup window was closed'));
});
});
}
}

0 comments on commit 8c9c1b5

Please sign in to comment.