mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Fix object destroyed error
This commit is contained in:
+7
-2
@@ -694,8 +694,13 @@ async function safeLoadURL(window: BrowserWindow, url: string): Promise<void> {
|
||||
}
|
||||
throw error;
|
||||
} finally {
|
||||
window.webContents.removeListener('did-stop-loading', onDestroyed);
|
||||
window.webContents.removeListener('destroyed', onDestroyed);
|
||||
try {
|
||||
window.webContents.removeListener('did-stop-loading', onDestroyed);
|
||||
window.webContents.removeListener('destroyed', onDestroyed);
|
||||
} catch {
|
||||
// We already logged or thrown an error - don't bother with handling the
|
||||
// error here.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user