Skip to content

Commit ddec69d

Browse files
committed
docs(experimental): fix parent reference in record
1 parent ded2d57 commit ddec69d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/router/src/experimental/router.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,21 +310,18 @@ export interface EXPERIMENTAL_RouteRecordNormalized_Group
310310
extends EXPERIMENTAL_RouteRecordNormalized_Base,
311311
EXPERIMENTAL_RouteRecord_Group {
312312
meta: RouteMeta
313-
parent: EXPERIMENTAL_RouteRecordNormalized | null
314313
}
315314

316315
export interface EXPERIMENTAL_RouteRecordNormalized_Redirect
317316
extends EXPERIMENTAL_RouteRecordNormalized_Base,
318317
EXPERIMENTAL_RouteRecord_Redirect {
319318
meta: RouteMeta
320-
parent: EXPERIMENTAL_RouteRecordNormalized | null
321319
}
322320

323321
export interface EXPERIMENTAL_RouteRecordNormalized_Components
324322
extends EXPERIMENTAL_RouteRecordNormalized_Base,
325323
EXPERIMENTAL_RouteRecord_Components {
326324
meta: RouteMeta
327-
parent: EXPERIMENTAL_RouteRecordNormalized | null
328325
}
329326

330327
export type EXPERIMENTAL_RouteRecordNormalized_Matchable =
@@ -352,11 +349,12 @@ export function normalizeRouteRecord(
352349
| Omit<EXPERIMENTAL_RouteRecordNormalized_Group, 'mods'> = {
353350
meta: {},
354351
// must be defined as non enumerable because it contains modules
352+
// which are complex objects that cannot be stringified
353+
// when user does {{ $route }}
355354
// mods: {},
356355
props: {},
357-
// TODO :make it optional as it changes nothing
358-
parent: null,
359-
// not having the property changes nothing
356+
// NOTE: not having the property changes nothing
357+
// parent: null,
360358
// aliasOf: null,
361359
...record,
362360
// FIXME: to be removed

0 commit comments

Comments
 (0)