Fixed a crash when the view loads for the first time (#2931)

This commit is contained in:
Devin Binnie 2023-12-15 11:32:32 -05:00 committed by GitHub
parent 0cab09b7f5
commit 113fda79b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,7 +192,6 @@ export class MattermostBrowserView extends EventEmitter {
} else {
loadURL = this.view.url.toString();
}
AppState.updateExpired(this.id, false);
this.log.verbose(`Loading ${loadURL}`);
const loading = this.browserView.webContents.loadURL(loadURL, {userAgent: composeUserAgent()});
loading.then(this.loadSuccess(loadURL)).catch((err) => {
@ -240,6 +239,7 @@ export class MattermostBrowserView extends EventEmitter {
reload = () => {
this.resetLoadingStatus();
AppState.updateExpired(this.id, false);
this.load();
}