From f0ded9f5be7adcb47e6294be97b81b8a1f30cbe7 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 9 May 2024 16:38:32 -0700 Subject: [PATCH] fix: update os cancel refresh on update page --- web/store/updateOs.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/store/updateOs.ts b/web/store/updateOs.ts index 6d646e075..bb564823b 100644 --- a/web/store/updateOs.ts +++ b/web/store/updateOs.ts @@ -79,6 +79,13 @@ export const useUpdateOsStore = defineStore('updateOs', () => { if (!response.success) { throw new Error('Unable to cancel update'); } + // if current path is /Tools/Update, then we should redirect to /Tools + // otherwise it will redirect to the account update os page. + if (window.location.pathname === '/Tools/Update') { + window.location.href = '/Tools'; + return; + } + // otherwise refresh the page window.location.reload(); } catch (error) { throw new Error('[cancelUpdate] Error cancelling update');