fix(electron): self-update is pending (#2272)

This commit is contained in:
Himself65
2023-05-09 07:16:07 +08:00
committed by GitHub
parent 4f99ad2db4
commit 1e8c5a4482
3 changed files with 16 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ export const appSidebarWidthAtom = atomWithStorage(
export const updateAvailableAtom = atomWithObservable<boolean>(() => {
return new Observable<boolean>(subscriber => {
subscriber.next(false);
if (typeof window !== 'undefined') {
const isMacosDesktop = environment.isDesktop && environment.isMacOs;
if (isMacosDesktop) {
@@ -25,6 +26,5 @@ export const updateAvailableAtom = atomWithObservable<boolean>(() => {
};
}
}
subscriber.next(false);
});
});