fix(router): going back uses correct nav transition (#21301)

This commit is contained in:
Matthias Max
2020-06-08 18:23:27 +02:00
committed by GitHub
parent a4f0bdb4c3
commit c8db0d5eeb

View File

@ -173,7 +173,7 @@ export class Router implements ComponentInterface {
const lastState = this.lastState; const lastState = this.lastState;
this.lastState = state; this.lastState = state;
if (state > lastState) { if (state > lastState || (state >= lastState && lastState > 0)) {
return ROUTER_INTENT_FORWARD; return ROUTER_INTENT_FORWARD;
} else if (state < lastState) { } else if (state < lastState) {
return ROUTER_INTENT_BACK; return ROUTER_INTENT_BACK;