File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/angular/ssr/src/utils Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,15 @@ export async function renderAngular(
100100 const envInjector = applicationRef . injector ;
101101 const routerIsProvided = ! ! envInjector . get ( ActivatedRoute , null ) ;
102102 const router = envInjector . get ( Router ) ;
103- const lastSuccessfulNavigation = router . lastSuccessfulNavigation ;
103+
104+ // TODO(alanagius): Remove the below check when version 21.0.0-next.0 is on NPM
105+ // Workaround for breaking change that landed on angular/angular main too early
106+ // https://github.com/angular/angular/pull/63057
107+ const lastSuccessfulNavigation =
108+ typeof router . lastSuccessfulNavigation === 'function'
109+ ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
110+ ( router as any ) . lastSuccessfulNavigation ( )
111+ : router . lastSuccessfulNavigation ;
104112
105113 if ( ! routerIsProvided ) {
106114 hasNavigationError = false ;
You can’t perform that action at this time.
0 commit comments