From b49ff6abfb32576ceee6074974b4e8328ba6f593 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 24 Nov 2022 13:01:49 -0800 Subject: [PATCH] Fix type error Signed-off-by: Sebastian Malton --- .../check-for-platform-updates.injectable.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/features/application-update/main/check-for-updates/check-for-platform-updates/check-for-platform-updates.injectable.ts b/src/features/application-update/main/check-for-updates/check-for-platform-updates/check-for-platform-updates.injectable.ts index 22726467a9..4619bbb468 100644 --- a/src/features/application-update/main/check-for-updates/check-for-platform-updates/check-for-platform-updates.injectable.ts +++ b/src/features/application-update/main/check-for-updates/check-for-platform-updates/check-for-platform-updates.injectable.ts @@ -29,13 +29,15 @@ const checkForPlatformUpdatesInjectable = getInjectable({ electronUpdater.autoDownload = false; electronUpdater.allowDowngrade = allowDowngrade; - let result: UpdateCheckResult; + let result: UpdateCheckResult | null = null; try { result = await electronUpdater.checkForUpdates(); } catch (error) { logger.error("[UPDATE-APP/CHECK-FOR-UPDATES]", error); - + } + + if (!result) { return { updateWasDiscovered: false, };