diff --git a/src/main/services/window-manager.ts b/src/main/services/window-manager.ts index 296ad4c1..45fd1097 100644 --- a/src/main/services/window-manager.ts +++ b/src/main/services/window-manager.ts @@ -251,18 +251,18 @@ export class WindowManager { editorWindow.once("ready-to-show", () => { editorWindow.show(); - WindowManager.mainWindow?.webContents.openDevTools(); + editorWindow.webContents.openDevTools(); }); editorWindow.webContents.on("before-input-event", (event, input) => { if (input.key === "F12") { event.preventDefault(); - this.mainWindow?.webContents.toggleDevTools(); + editorWindow.webContents.toggleDevTools(); } }); editorWindow.on("close", () => { - WindowManager.mainWindow?.webContents.closeDevTools(); + editorWindow.webContents.closeDevTools(); this.editorWindows.delete(themeId); }); }