Skip to content

Commit 1d651b1

Browse files
committed
fix: Close OAuth BrowserView only if present
It seems our OAuth `BrowserView` can be undefined when it's time to close it. Although we're uncertain why, it could be Electron closes it already when loading the redirect URL. Anyway, we can check for its presence before trying to close it and avoid errors.
1 parent 2682ac2 commit 1d651b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gui/js/onboarding.window.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ module.exports = class OnboardingWM extends WindowManager {
115115
}
116116

117117
closeOAuthView() {
118-
this.win.removeBrowserView(this.oauthView)
118+
if (this.oauthView) {
119+
this.win.removeBrowserView(this.oauthView)
120+
}
119121
}
120122

121123
async create() {

0 commit comments

Comments
 (0)