summaryrefslogtreecommitdiffhomepage
path: root/gui/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/main')
-rw-r--r--gui/src/main/index.ts15
1 files changed, 6 insertions, 9 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index 00aa31abdb..2467b511d0 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -68,7 +68,8 @@ export interface ICurrentAppVersionInfo {
}
export interface IAppUpgradeInfo extends IAppVersionInfo {
- nextUpgrade?: string;
+ // Null is used since undefined properties get filtered out when sending through IPC.
+ nextUpgrade: string | null;
}
type AccountVerification = { status: 'verified' } | { status: 'deferred'; error: Error };
@@ -143,7 +144,7 @@ class ApplicationMain {
latestStable: '',
latestBeta: '',
latest: '',
- nextUpgrade: undefined,
+ nextUpgrade: null,
};
// The UI locale which is set once from onReady handler
@@ -752,15 +753,11 @@ class ApplicationMain {
private setLatestVersion(latestVersionInfo: IAppVersionInfo) {
const settings = this.settings;
- function nextUpgrade(
- current: string,
- latest: string,
- latestStable: string,
- ): string | undefined {
+ function nextUpgrade(current: string, latest: string, latestStable: string): string | null {
if (settings.showBetaReleases) {
- return current === latest ? undefined : latest;
+ return current === latest ? null : latest;
} else {
- return current === latestStable ? undefined : latestStable;
+ return current === latestStable ? null : latestStable;
}
}