summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-04-07 17:21:46 +0200
committerSebastian Holmin <sebastian.holmin@mullvad.net>2025-05-28 13:25:24 +0200
commitb6ba41bd147d9336ae97052b1c6be678c842c9df (patch)
tree47f5f47a04a98b66254462b51f463969b06a13b0
parent5aec2fafc0c5afe492e0372aa4cac111439944f3 (diff)
downloadmullvadvpn-b6ba41bd147d9336ae97052b1c6be678c842c9df.tar.xz
mullvadvpn-b6ba41bd147d9336ae97052b1c6be678c842c9df.zip
Update logic to determine if verified installer path is set
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/app.tsx4
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/hooks/useHasAppUpgradeVerifiedInstallerPath.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/app.tsx b/desktop/packages/mullvad-vpn/src/renderer/app.tsx
index e82cd65500..49438f3964 100644
--- a/desktop/packages/mullvad-vpn/src/renderer/app.tsx
+++ b/desktop/packages/mullvad-vpn/src/renderer/app.tsx
@@ -419,7 +419,7 @@ export default class AppRenderer {
// Ensure we have a the path to the verified installer and that we are not already trying
// to start the installer.
if (
- verifiedInstallerPath &&
+ typeof verifiedInstallerPath === 'string' &&
appUpgradeEvent?.type !== 'APP_UPGRADE_STATUS_STARTING_INSTALLER'
) {
// Ensure we don't try to start the installer multiple times by setting the status
@@ -651,7 +651,7 @@ export default class AppRenderer {
const windowFocused = reduxState.userInterface.windowFocused;
if (
- verifiedInstallerPath &&
+ typeof verifiedInstallerPath === 'string' &&
appUpgradeEvent?.type === 'APP_UPGRADE_STATUS_VERIFIED_INSTALLER'
) {
// Only trigger the installer if the window is focused
diff --git a/desktop/packages/mullvad-vpn/src/renderer/hooks/useHasAppUpgradeVerifiedInstallerPath.ts b/desktop/packages/mullvad-vpn/src/renderer/hooks/useHasAppUpgradeVerifiedInstallerPath.ts
index 1f798cfc68..4ff6093d14 100644
--- a/desktop/packages/mullvad-vpn/src/renderer/hooks/useHasAppUpgradeVerifiedInstallerPath.ts
+++ b/desktop/packages/mullvad-vpn/src/renderer/hooks/useHasAppUpgradeVerifiedInstallerPath.ts
@@ -3,7 +3,7 @@ import { useVersionSuggestedUpgrade } from '../redux/hooks';
export const useHasAppUpgradeVerifiedInstallerPath = () => {
const { suggestedUpgrade } = useVersionSuggestedUpgrade();
- const hasVerifiedInstallerPath = suggestedUpgrade?.verifiedInstallerPath !== undefined;
+ const hasVerifiedInstallerPath = typeof suggestedUpgrade?.verifiedInstallerPath === 'string';
return hasVerifiedInstallerPath;
};