From 209850826c792cdf2d59a8c23a99093437401539 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Thu, 27 Jan 2022 15:35:21 -0500 Subject: [PATCH 1/2] trying to fix params --- src/router/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/router/index.js b/src/router/index.js index 2a80032f6..978157016 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -35,6 +35,7 @@ const routes = [ }, { path: "/", + name: "root", async beforeEnter(to, from, next) { // If we have no query string, or we don't have the FmgPage query string. if (to.query.fmgPage === undefined) { @@ -97,7 +98,7 @@ router.navigate = ( if (matchingScenarioMap.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. router.push({ - path: "/", + name: "root", query: Object.assign(optionalQuery, { fmgPage: matchingScenarioMap.destinationFmgPageValue, }), From 19136a04c08755cc39945f58b720e34400fa85a8 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Thu, 27 Jan 2022 15:58:35 -0500 Subject: [PATCH 2/2] transmitting params in router --- src/router/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 978157016..79894066e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -45,7 +45,7 @@ const routes = [ try { // If we already have our route, go to it. if (router.hasRoute(to.query.fmgPage)) { - return next({ name: to.query.fmgPage, query: to.query }); + return next({ name: to.query.fmgPage, query: to.query, params: to.params }); } // Get route info for the given url. Names will have a 1:1 relationship with names in the Cms. @@ -59,7 +59,7 @@ const routes = [ }); // Assign current query string parameters, as well as our fmgPage one. - next({ name: routeData[0].name, query: Object.assign(to.query, { fmgPage: routeData[0].name }) }); + next({ name: routeData[0].name, query: Object.assign(to.query, { fmgPage: routeData[0].name }), params: to.params }); } catch (error) { console.log(error);