feat: mark active or ancestor links (#1840)

This commit is contained in:
Marvin Hagemeister
2023-10-02 18:22:44 +02:00
committed by GitHub
parent d638c526f5
commit 4295dbe85d
11 changed files with 304 additions and 138 deletions
+2
View File
@@ -40,6 +40,7 @@ export class RenderState {
error: Error | null = null;
isPartial: boolean;
partialCount = 0;
url: URL;
constructor(
routeOptions: RenderStateRouteOptions,
@@ -51,6 +52,7 @@ export class RenderState {
this.routeOptions = routeOptions;
this.csp = csp;
this.componentStack = componentStack;
this.url = routeOptions.url;
this.isPartial = routeOptions.url.searchParams.has(PARTIAL_SEARCH_PARAM);
if (error) this.routeOptions.error = error;