Skip to content

Commit

Permalink
Fix development issue on Windows (#1466)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Jan 30, 2024
1 parent 18c4c9d commit 07fe7ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 07fe7ac

Please sign in to comment.