fix(react): redirect routes should unmount leaving component, fixes #22022 (#22029)

This commit is contained in:
Ely Lucas
2020-09-04 14:56:20 -06:00
committed by GitHub
parent ec7c023873
commit b11e06cec1
5 changed files with 14 additions and 13 deletions

View File

@ -100,8 +100,6 @@ class IonRouterInner extends React.PureComponent<IonRouteProps, IonRouteState> {
} else {
leavingLocationInfo = this.locationHistory.current();
}
} else if (action === 'REPLACE') {
leavingLocationInfo = this.locationHistory.previous();
} else {
leavingLocationInfo = this.locationHistory.current();
}
@ -113,7 +111,7 @@ class IonRouterInner extends React.PureComponent<IonRouteProps, IonRouteState> {
this.incomingRouteParams = {
routeAction: 'replace',
routeDirection: 'none',
tab: this.currentTab
tab: this.currentTab //TODO this isn't legit if replacing to a page that is not in the tabs
};
}
if (action === 'POP') {