File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments