Skip to content

Commit

Permalink
fix: webContents is null
Browse files Browse the repository at this point in the history
  • Loading branch information
N0chteil committed Oct 22, 2023
1 parent e3fe04a commit 75e6dc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/managers/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ export class Browser {

saveWindowState() {
if (!this.window) return;

setConfig("windowState", this.window.getBounds());
}

send(channel: string, ...args: any[]) {
if (!this.window) return;
if (!this.window || !this.window.webContents) return;

setTimeout(
() => this.window.webContents.send(channel, ...args),
Expand Down

0 comments on commit 75e6dc9

Please sign in to comment.