mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
ensure cancel error is triggered if exit and oauth not processed
This commit is contained in:
@@ -64,6 +64,12 @@ OAuth.showPopup = (url, callback, dimensions) => {
|
||||
};
|
||||
|
||||
const onExit = () => {
|
||||
// Force callback to throw cancel error when exit
|
||||
// and oauth process didn't start
|
||||
if (!oauthFinished) {
|
||||
callback();
|
||||
}
|
||||
|
||||
popup.removeEventListener('loadstop', pageLoaded);
|
||||
popup.removeEventListener('loaderror', fail);
|
||||
popup.removeEventListener('exit', onExit);
|
||||
|
||||
Reference in New Issue
Block a user