cozy-labs / cozy-desktop

File Synchronisation for Cozy on Desktop and Laptop
https://cozy-labs.github.io/cozy-desktop/
GNU Affero General Public License v3.0
99 stars 45 forks source link

fix: Close OAuth BrowserView only if present #2313

Closed taratatach closed 1 year ago

taratatach commented 1 year ago

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.

Please make sure the following boxes are checked: