diff --git a/aio/src/app/app.component.spec.ts b/aio/src/app/app.component.spec.ts index 4d99f86e82b..13cb70b70e4 100644 --- a/aio/src/app/app.component.spec.ts +++ b/aio/src/app/app.component.spec.ts @@ -877,6 +877,12 @@ describe('AppComponent', () => { testCurrentNodes.next({SideNav: {url: 'foo', view: 'SideNav', nodes: []}}); verifyNoRedirection(); + testCurrentNodes.next({'': {url: 'license', view: '', nodes: []}}); + verifyNoRedirection(); + + testCurrentNodes.next({'': {url: 'community', view: '', nodes: []}}); + verifyPossibleRedirection(); + testCurrentNodes.next({NoSideNav: {url: 'bar', view: 'SideNav', nodes: []}}); verifyPossibleRedirection(); diff --git a/aio/src/app/app.component.ts b/aio/src/app/app.component.ts index 0f3262d8a47..b2f3379551b 100644 --- a/aio/src/app/app.component.ts +++ b/aio/src/app/app.component.ts @@ -168,7 +168,15 @@ export class AppComponent implements OnInit { // Redirect to docs if we are in archive mode and are not hitting a docs page // (i.e. we have arrived at a marketing page) - if (this.deployment.mode === 'archive' && !currentNodes[sideNavView]) { + if (this.deployment.mode === 'archive') { + // We allow visiting the license page. + if (currentNodes['']?.url === 'license') { + return; + } + // We allow visiting anything that we know to be a docs page. + if (currentNodes[sideNavView] !== undefined) { + return; + } this.locationService.replace('docs'); } });