Skip to content

Commit 4309554

Browse files
committed
1 parent e686354 commit 4309554

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/router/src/matcher/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,12 +520,13 @@ export function checkChildMissingNameWithEmptyPath(
520520
parent &&
521521
parent.record.name &&
522522
!mainNormalizedRecord.name &&
523-
!mainNormalizedRecord.path
523+
!mainNormalizedRecord.path &&
524+
mainNormalizedRecord.children.length === 0
524525
) {
525526
warn(
526527
`The route named "${String(
527528
parent.record.name
528-
)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`
529+
)}" has a child without a name, an empty path, and no children. This is probably a mistake: using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to silence the warning.`
529530
)
530531
}
531532
}

0 commit comments

Comments
 (0)