diff --git a/src/tray.ts b/src/tray.ts index 65fbf64..171397a 100644 --- a/src/tray.ts +++ b/src/tray.ts @@ -72,7 +72,9 @@ export function create(config: IConfig): void { guid = uuidv5(`${app.getName()}-${app.getPath("userData")}`, getUuid()); } - trayIcon = new Tray(defaultIcon, guid); + // Passing guid=undefined on Windows will cause it to throw `Error: Invalid GUID format` + // The type here is wrong, the param must be omitted, never undefined. + trayIcon = guid ? new Tray(defaultIcon, guid) : new Tray(defaultIcon); trayIcon.setToolTip(config.brand); initApplicationMenu(); trayIcon.on("click", toggleWin);