diff --git a/packages/vue-router/src/router.ts b/packages/vue-router/src/router.ts index 35ce3d55a94..1e8ae831c13 100644 --- a/packages/vue-router/src/router.ts +++ b/packages/vue-router/src/router.ts @@ -307,7 +307,7 @@ export const createIonRouter = ( } const leavingUrl = - leavingLocationInfo.pathname + leavingLocationInfo.search; + leavingLocationInfo.pathname + leavingLocationInfo.search ? '+' : '' + leavingLocationInfo.search; if (leavingUrl !== location.fullPath) { if (!incomingRouteParams) { if (action === "replace") { @@ -474,6 +474,8 @@ export const createIonRouter = ( ) { locationHistory.clearHistory(routeInfo); locationHistory.add(routeInfo); + }else{ + locationHistory.add(routeInfo); } } else { locationHistory.add(routeInfo);