Skip to content

Commit 72feec7

Browse files
ci: apply automated fixes
1 parent 9715c1f commit 72feec7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/router-core/src/route.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,7 +1676,11 @@ export class BaseRoute<
16761676
}
16771677

16781678
if (process.env.NODE_ENV !== 'production') {
1679-
if (this.parentRoute && !this.parentRoute.isRoot && this.parentRoute.fullPath.endsWith('/')) {
1679+
if (
1680+
this.parentRoute &&
1681+
!this.parentRoute.isRoot &&
1682+
this.parentRoute.fullPath.endsWith('/')
1683+
) {
16801684
invariant(
16811685
false,
16821686
`Parent route with id '${this.parentRoute.id}' returned by getParentRoute on '${this.id}' is an index route and cannot have child routes.`,
@@ -1737,14 +1741,14 @@ export class BaseRoute<
17371741
TServerMiddlewares,
17381742
THandlers
17391743
> = (children) => {
1740-
if (process.env.NODE_ENV !== 'production') {
1744+
if (process.env.NODE_ENV !== 'production') {
17411745
if (!this.isRoot && this.fullPath.endsWith('/')) {
17421746
invariant(
17431747
false,
17441748
`Cannot add children to index route '${this.id}'. Index routes cannot have child routes.`,
17451749
)
17461750
}
1747-
}
1751+
}
17481752
return this._addFileChildren(children) as any
17491753
}
17501754

0 commit comments

Comments
 (0)