Skip to content

Commit

Permalink
fix(p-r-o): needless forward navigation after back inside nested name…
Browse files Browse the repository at this point in the history
…d outlet
  • Loading branch information
ADjenkov authored and ADjenkov committed Dec 17, 2018
1 parent d5ccaf5 commit 130e392
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nativescript-angular/router/page-router-outlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire
if (modalNavigation > 0) { // Modal with 'primary' p-r-o
outlet = this.locationStrategy.findOutletByModal(modalNavigation);
} else {
const pathByOutlets = this.locationStrategy.getPathByOutlets(topActivatedRoute);
outlet = this.locationStrategy.findOutletByKey(outletKey);
outlet = outlet || this.locationStrategy.findOutletByOutletPath(pathByOutlets);
}

// Named lazy loaded outlet.
Expand All @@ -436,6 +434,9 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire
if (outlet) {
outlet.outletKeys.push(outletKey);
}
} else if (!outlet) {
const pathByOutlets = this.locationStrategy.getPathByOutlets(topActivatedRoute);
outlet = this.locationStrategy.findOutletByOutletPath(pathByOutlets);
}

return outlet;
Expand Down

0 comments on commit 130e392

Please sign in to comment.