fix(vue): router replace action uses custom animation

This commit is contained in:
Sean Perkins
2023-08-31 21:56:38 -04:00
parent 7dc9d2d55e
commit 64f319903a

View File

@@ -400,6 +400,8 @@ export const createIonRouter = (
currentHistoryPosition
);
const routerAnimation = incomingRouteParams.routerAnimation || currentRouteInfo?.routerAnimation || routeInfo.routerAnimation;
/**
* If going from /home to /child, then replacing from
* /child to /home, we don't want the route info to
@@ -417,8 +419,7 @@ export const createIonRouter = (
routeInfo.pushedByRoute = pushedByRoute;
routeInfo.routerDirection =
currentRouteInfo?.routerDirection || routeInfo.routerDirection;
routeInfo.routerAnimation =
currentRouteInfo?.routerAnimation || routeInfo.routerAnimation;
routeInfo.routerAnimation = routerAnimation;
routeInfo.prevRouteLastPathname = currentRouteInfo?.lastPathname;
}
}