fix(electron): only pass tray GUID on Windows to prevent validation error

Electron validates the GUID argument even when undefined is passed,
causing "Invalid GUID format" error on Linux/macOS. Only pass the
GUID argument on Windows where it's needed.
This commit is contained in:
Johannes Millan 2026-01-13 12:23:04 +01:00
parent 0414b74365
commit df386a7a7e

View file

@ -47,7 +47,8 @@ export const initIndicator = ({
initListeners();
const suf = shouldUseDarkColors ? '-d.png' : '-l.png';
tray = new Tray(DIR + `stopped${suf}`, IS_WINDOWS ? WINDOWS_TRAY_GUID : undefined);
const trayIconPath = DIR + `stopped${suf}`;
tray = IS_WINDOWS ? new Tray(trayIconPath, WINDOWS_TRAY_GUID) : new Tray(trayIconPath);
tray.setContextMenu(createContextMenu(showApp, quitApp));
tray.on('click', () => {