docs: allow reaching the license page while in archive mode

Fixes #66332
This commit is contained in:
Joey Perrott
2026-01-06 15:15:52 +00:00
committed by Kirill Cherkashin
parent fc6e55ba18
commit faba1a6967
2 changed files with 15 additions and 1 deletions
+6
View File
@@ -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();
+9 -1
View File
@@ -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');
}
});