From 3edd9d52bc2a70be5c932a22353234a37cf0b377 Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Wed, 16 Oct 2024 00:47:23 +0200 Subject: [PATCH] Open dev tools only if app is not packaged --- app/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/main.ts b/app/main.ts index 4c99c91..c1ebbd0 100644 --- a/app/main.ts +++ b/app/main.ts @@ -57,7 +57,7 @@ function createWindow(): BrowserWindow { tray.setContextMenu(trayMenu); console.log(`createWindow(): icon = ${wdwIcon}`); - + console.log(`app.isPackaged: ${app.isPackaged}`); // Create the browser window. win = new BrowserWindow({ x: 0, @@ -69,13 +69,13 @@ function createWindow(): BrowserWindow { nodeIntegration: false, allowRunningInsecureContent: (serve), contextIsolation: true, - devTools: true + devTools: !app.isPackaged }, autoHideMenuBar: true, icon: wdwIcon }); - win.webContents.openDevTools(); + if (!app.isPackaged)win.webContents.openDevTools(); if (serve) { const debug = require('electron-debug');