Null guard global mainWindow better (#948)
This commit is contained in:
+1
-1
@@ -253,7 +253,7 @@ ipcMain.on("ipcCall", async function (_ev: IpcMainEvent, payload) {
|
||||
return;
|
||||
}
|
||||
|
||||
global.mainWindow.webContents.send("ipcReply", {
|
||||
global.mainWindow?.webContents.send("ipcReply", {
|
||||
id: payload.id,
|
||||
reply: ret,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user