From 0511cc08c733004ddf3f681bd3561eaa895446a3 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sat, 15 Feb 2025 23:27:18 -0300 Subject: [PATCH] fix: editor window use correct dev tools --- src/main/services/window-manager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); }); }