From 0964993a451cfc9d2497ab7e743b7784cdc12981 Mon Sep 17 00:00:00 2001 From: Belar Date: Fri, 10 Jan 2025 11:59:50 +0000 Subject: [PATCH] fix: title bar overlay call to run only if present Dynamically setting title bar overlay is available only on Windows and Linux, the method is not present on MacOS. --- src/process/window.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process/window.js b/src/process/window.js index 1a2ee5f..344eb46 100644 --- a/src/process/window.js +++ b/src/process/window.js @@ -92,7 +92,7 @@ export const MainWindow = { ipcMain.on("set-theme", (_event, themeId) => { nativeTheme.themeSource = themeId; - mainWindow.setTitleBarOverlay({ + mainWindow.setTitleBarOverlay?.({ ...TITLEBAR_OVERLAY.BASE, ...(nativeTheme.shouldUseDarkColors ? TITLEBAR_OVERLAY.DARK