@@ -164,7 +164,7 @@ function resolveLoaders(
164164 node : RouteData ,
165165 gatheredLayouts : ModuleLoader [ ]
166166) : ModuleLoader [ ] | undefined {
167- if ( node . _G ) {
167+ if ( node . _G != null ) {
168168 // Rewrite: re-walk from root using _G's keys
169169 const keys = ( node . _G as string ) . split ( '/' ) . filter ( ( p ) => p . length > 0 ) ;
170170 const target = walkTrieKeys ( root , keys ) ;
@@ -176,7 +176,7 @@ function resolveLoaders(
176176
177177 // If the target node doesn't have _I directly, check group children
178178 // (e.g., root index inside (common) group, or routes inside pathless groups)
179- if ( ! targetNode . _I && ! targetNode . _G ) {
179+ if ( ! targetNode . _I && targetNode . _G == null ) {
180180 const indexResult = findIndexNode ( targetNode ) ;
181181 if ( indexResult ) {
182182 for ( const g of indexResult . groups ) {
@@ -350,7 +350,7 @@ function tryWildcardMatch(
350350 * node and the groups entered to reach it.
351351 */
352352function findIndexNode ( node : RouteData ) : { target : RouteData ; groups : RouteData [ ] } | undefined {
353- if ( node . _I || node . _G ) {
353+ if ( node . _I || node . _G != null ) {
354354 return { target : node , groups : [ ] } ;
355355 }
356356 if ( node . _M ) {
@@ -502,7 +502,7 @@ function matchRouteTree(
502502 // Check if _I is in a group child (e.g. (common)/index.tsx is the root "/" route)
503503 // This must come before _A checks so that an index route takes priority over
504504 // a rest wildcard with empty value.
505- if ( ! node . _I && ! node . _G ) {
505+ if ( ! node . _I && node . _G == null ) {
506506 const indexResult = findIndexNode ( node ) ;
507507 if ( indexResult ) {
508508 collectNodeMeta (
@@ -518,7 +518,7 @@ function matchRouteTree(
518518 }
519519
520520 // Check for _A (rest wildcard with empty value) on the node itself
521- if ( ! node . _I && ! node . _G && node . _A ) {
521+ if ( ! node . _I && node . _G == null && node . _A ) {
522522 const next = node . _A as RouteData ;
523523 const paramName = next . _P ! ;
524524 params [ paramName as string ] = '' ;
@@ -533,7 +533,7 @@ function matchRouteTree(
533533 }
534534
535535 // Also check _M groups for _A with empty value
536- if ( ! node . _I && ! node . _G ) {
536+ if ( ! node . _I && node . _G == null ) {
537537 const restInfo = findRestNode ( node ) ;
538538 if ( restInfo ) {
539539 const next = restInfo . next ;
0 commit comments