From d70f264d465da0ebfef4c14053cdc1d4bf1440c4 Mon Sep 17 00:00:00 2001 From: rhysd Date: Thu, 20 Apr 2017 23:41:25 +0900 Subject: [PATCH] do not navigate to login page if destination of redirect is expected page --- main/window.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/window.ts b/main/window.ts index 637abb4..bb32037 100644 --- a/main/window.ts +++ b/main/window.ts @@ -83,6 +83,9 @@ export default class Window { open(url: string) { log.debug('Open URL:', url); this.browser.webContents.once('did-get-redirect-request', (e: Event, _: string, newUrl: string) => { + if (url === newUrl) { + return; + } log.debug('Redirecting to ' + newUrl + '. Will navigate to login page for user using single user mode'); e.preventDefault(); this.browser.loadURL(`https://${this.account.host}/auth/sign_in`);