Clean up webview handling by unbinding and destroying it after login
This commit is contained in:
parent
8320d69f73
commit
fd9734ccb7
1 changed files with 3 additions and 2 deletions
|
@ -30,6 +30,9 @@ export default async () => {
|
|||
if (url.startsWith("https://desktop.tidal.com")) {
|
||||
const code = new URL(url)
|
||||
|
||||
webview.unbind("getURL");
|
||||
webview.destroy()
|
||||
|
||||
await finalizeLogin(code.search);
|
||||
didLogin = true;
|
||||
}
|
||||
|
@ -42,8 +45,6 @@ export default async () => {
|
|||
while (!didLogin) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
}
|
||||
|
||||
webview.destroy()
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue