[MM-36543] Check for webcontents before trying to load url in case tab was removed (#1633)

This commit is contained in:
Devin Binnie 2021-06-21 08:48:31 -04:00 committed by GitHub
parent 62a0d148ec
commit 422673a740
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ export class MattermostView extends EventEmitter {
retry = (loadURL) => {
return () => {
// window was closed while retrying
if (!this.view) {
if (!this.view || !this.view.webContents) {
return;
}
const loading = this.view.webContents.loadURL(loadURL, {userAgent: composeUserAgent()});