Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions packages/react-router/src/ReactRouter/IonRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,15 @@ class IonRouterInner extends React.PureComponent<IonRouteProps, IonRouteState> {
routeInfo.lastPathname = currentRouteInfo?.pathname || routeInfo.lastPathname;
routeInfo.prevRouteLastPathname = currentRouteInfo?.lastPathname;
routeInfo.pushedByRoute = pushedByRoute;
routeInfo.routeDirection = currentRouteInfo?.routeDirection || routeInfo.routeDirection;
routeInfo.routeAnimation = currentRouteInfo?.routeAnimation || routeInfo.routeAnimation;

/**
* When replacing routes we should still prefer
* any custom direction/animation that the developer
* has specified when navigating first instead of relying
* on previously used directions/animations.
*/
routeInfo.routeDirection = routeInfo.routeDirection || currentRouteInfo?.routeDirection;
routeInfo.routeAnimation = routeInfo.routeAnimation || currentRouteInfo?.routeAnimation;
Comment thread
aeharding marked this conversation as resolved.
}

this.locationHistory.add(routeInfo);
Expand Down