Skip to content

Commit ff2c9f7

Browse files
committed
fix(angular): remove legacy code for Angular < 7.2.0
1 parent 6aaef02 commit ff2c9f7

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

packages/angular/common/src/directives/navigation/stack-controller.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,7 @@ export class StackController {
6767

6868
const viewsSnapshot = this.views.slice();
6969

70-
let currentNavigation;
71-
72-
const router = this.router as any;
73-
74-
// Angular >= 7.2.0
75-
if (router.getCurrentNavigation) {
76-
currentNavigation = router.getCurrentNavigation();
77-
78-
// Angular < 7.2.0
79-
} else if (router.navigations?.value) {
80-
currentNavigation = router.navigations.value;
81-
}
70+
const currentNavigation = this.router.getCurrentNavigation();
8271

8372
/**
8473
* If the navigation action sets `replaceUrl: true` then we need to make sure

0 commit comments

Comments
 (0)