From 30b1cfd787eb25fd333053f623e5fb805467abd4 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 22 Oct 2025 11:44:11 -0400 Subject: [PATCH] Tie up possible race conditions --- src/router/methods/before-each.js | 4 ++-- src/router/methods/navigate.js | 2 +- src/router/methods/route-logic/error.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/router/methods/before-each.js b/src/router/methods/before-each.js index 67a6ecf84..15eae5d8c 100644 --- a/src/router/methods/before-each.js +++ b/src/router/methods/before-each.js @@ -41,7 +41,7 @@ export async function beforeEach(to, from) { nextPage: to?.name, }; - handleSoftError(errorPayload, true); + await handleSoftError(errorPayload, true); return false; } @@ -88,7 +88,7 @@ export async function beforeEach(to, from) { nextPage: to?.name, }; - handleSoftError(errorPayload); + await handleSoftError(errorPayload); return; } diff --git a/src/router/methods/navigate.js b/src/router/methods/navigate.js index 25c58e7e5..b80d31769 100644 --- a/src/router/methods/navigate.js +++ b/src/router/methods/navigate.js @@ -30,7 +30,7 @@ async function navigate(scenario, currentPageName, withSaving = false, forceTopL nextPage: nextPage?.name, }; - handleSoftError(errorPayload); + await handleSoftError(errorPayload); return; } diff --git a/src/router/methods/route-logic/error.js b/src/router/methods/route-logic/error.js index 573d3cddd..d82080f88 100644 --- a/src/router/methods/route-logic/error.js +++ b/src/router/methods/route-logic/error.js @@ -18,7 +18,7 @@ export async function errorBeforeEnter(to, from) { nextPage: to?.name, }; - handleHardError(errorPayload); + await handleHardError(errorPayload); return; } @@ -31,7 +31,7 @@ export async function errorBeforeEnter(to, from) { nextPage: to?.name, }; - handleHardError(errorPayload); + await handleHardError(errorPayload); return; } else { await store.dispatch(storeActions.UPDATE_HAS_TRIGGERED_ERROR, true);