Skip to content

Commit

Permalink
fix(App): Fix crash on logout
Browse files Browse the repository at this point in the history
  • Loading branch information
adlk committed Dec 14, 2024
1 parent 313ca03 commit 69ad832
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/electron/ipc-api/browserViewManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export default async ({ mainWindow, settings: { app: settings } }: { mainWindow:
ipcMain.on(IPC.TODOS_CLIENT_CHANNEL, (event, data) => {
debug('Received client IPC message from Todos', data);

mainWindow.webContents.send(IPC.TODOS_CLIENT_CHANNEL, data);
mainWindow?.webContents.send(IPC.TODOS_CLIENT_CHANNEL, data);
});

ipcMain.on(IPC.TODOS_HOST_CHANNEL, (event, data) => {
Expand All @@ -298,10 +298,10 @@ export default async ({ mainWindow, settings: { app: settings } }: { mainWindow:

if (data.action === 'todos:toggleDevTools') {
if (todosService) {
todosService.webContents.toggleDevTools();
todosService?.webContents.toggleDevTools();
}
} else {
todosService.webContents.send(IPC.TODOS_HOST_CHANNEL, data);
todosService?.webContents.send(IPC.TODOS_HOST_CHANNEL, data);
}
});

Expand Down

0 comments on commit 69ad832

Please sign in to comment.