diff --git a/src/router/index.js b/src/router/index.js index 525664dd5..11e9186d2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -159,10 +159,9 @@ async function navigate(scenario, currentRoute, optionalQuery = {}, optionalPara if (destinationFmgPageValue !== undefined) { // We're always pushing the same path, just changing query strings. Make sure our optional query strings get combined with our fmgPage one. - // Update page data to the store for next page if provided. Otherwise, keep existing page data - if (optionalPageData !== undefined) { - baseMixin.methods.savePageDataToStore(destinationFmgPageValue, optionalPageData); - } + // Update page data to the store for next page if provided. Otherwise, keep existing page data or set to empty object + const existingPageDataForPage = store.getters.pageData(destinationFmgPageValue); + baseMixin.methods.savePageDataToStore(destinationFmgPageValue, optionalPageData ? optionalPageData : existingPageDataForPage ?? {}); // if cookie and referralNumber/Date exists OR an emailAddress has been saved if ((getFunnelCookie()?.ReferralNumber && getFunnelCookie()?.ReferralDate) || store.getters.order.customer?.emailAddress) {