Skip to content

Commit

Permalink
fix: title bar overlay call to run only if present
Browse files Browse the repository at this point in the history
Dynamically setting title bar overlay
is available only on Windows and Linux,
the method is not present on MacOS.
  • Loading branch information
Belar committed Jan 10, 2025
1 parent ae4ee59 commit 0964993
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/process/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0964993

Please sign in to comment.