Skip to content

Commit 6b13f54

Browse files
committed
Make showStatusWindow wor in both processes, just in case
1 parent 9305bc8 commit 6b13f54

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/src/mailsync-process.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,14 @@ export class MailsyncProcess extends EventEmitter {
105105

106106
_showStatusWindow(mode) {
107107
if (this._win) return;
108-
const { BrowserWindow } = require('@electron/remote/main');
108+
109+
let BrowserWindow;
110+
if (process.type === 'renderer') {
111+
BrowserWindow = require('@electron/remote').BrowserWindow;
112+
} else {
113+
BrowserWindow = require('electron').BrowserWindow;
114+
}
115+
109116
this._win = new BrowserWindow({
110117
width: 350,
111118
height: 108,

0 commit comments

Comments
 (0)