From be6f2164d30f11196193b35d5fff22f6161f636b Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 15 Oct 2016 09:56:46 +0900 Subject: [PATCH] Fix error on authentication failure https://github.com/k0kubun/Nocturn/issues/25 --- src/utils/authentication.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/utils/authentication.js b/src/utils/authentication.js index 49c23ce..1c22744 100644 --- a/src/utils/authentication.js +++ b/src/utils/authentication.js @@ -117,6 +117,7 @@ export default class Authentication { callback(token); if (authWindow) { authWindow.close(); + authWindow = null; } }); } @@ -133,10 +134,6 @@ export default class Authentication { } }); - authWindow.on('closed', function() { - authWindow = null; - }); - if (oldWindow) { oldWindow.close(); }