fixed check for tray availability
This commit is contained in:
parent
4aee841db3
commit
3098b5840f
1 changed files with 1 additions and 1 deletions
2
src/main/mainWindow.ts
Normal file → Executable file
2
src/main/mainWindow.ts
Normal file → Executable file
|
@ -481,7 +481,7 @@ export async function createWindows() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function setTrayIcon(iconURI: string) {
|
export async function setTrayIcon(iconURI: string) {
|
||||||
if (!tray) return;
|
if (!tray || tray.isDestroyed()) return;
|
||||||
if (iconURI !== "" && iconURI !== "icon") {
|
if (iconURI !== "" && iconURI !== "icon") {
|
||||||
tray.setImage(nativeImage.createFromDataURL(iconURI));
|
tray.setImage(nativeImage.createFromDataURL(iconURI));
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue