From a69e7c59f4cda5e2decbc2d9699aa6958de7fbc6 Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sun, 3 May 2026 14:42:28 +0200 Subject: [PATCH 1/2] fix(electron): fix invalid default size fallback --- js/electron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/electron.js b/js/electron.js index ac48dd4b3f..13ecbf805d 100644 --- a/js/electron.js +++ b/js/electron.js @@ -36,7 +36,7 @@ function createWindow () { * see https://www.electronjs.org/docs/latest/api/screen * Create a window that fills the screen's available work area. */ - let electronSize = (800, 600); + let electronSize = { width: 800, height: 600 }; try { electronSize = electron.screen.getPrimaryDisplay().workAreaSize; } catch { From f1e3d9f6fe9f02c43cb029787e01a56cf0081fe0 Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sun, 3 May 2026 14:42:38 +0200 Subject: [PATCH 2/2] fix(electron): fix appendSwitch and electronSwitches handling --- js/electron.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/electron.js b/js/electron.js index 13ecbf805d..3105966801 100644 --- a/js/electron.js +++ b/js/electron.js @@ -43,8 +43,10 @@ function createWindow () { Log.warn("Could not get display size, using defaults ..."); } - let electronSwitchesDefaults = ["autoplay-policy", "no-user-gesture-required"]; - app.commandLine.appendSwitch(...new Set(electronSwitchesDefaults, config.electronSwitches)); + app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required"); + for (const electronSwitch of (config.electronSwitches || [])) { + app.commandLine.appendSwitch(electronSwitch); + } let electronOptionsDefaults = { width: electronSize.width, height: electronSize.height,