Skip to content

Commit d6caf3d

Browse files
committed
Fix ipc error when trayWindow is not set
1 parent a99ec4f commit d6caf3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,9 @@ gtt._send = (key, val) => {
399399
if (debug) {
400400
gtt._dump(`ipc main send: ${key}, ${val}`);
401401
}
402-
trayWindow.webContents.send(key, val);
402+
403+
if(trayWindow)
404+
trayWindow.webContents.send(key, val);
403405
};
404406

405407
gtt._watchers.config = {

0 commit comments

Comments
 (0)