@@ -981,20 +981,18 @@ function initializeModelChunk<T>(chunk: ResolvedModelChunk<T>): void {
981981      } 
982982    } 
983983
984-     if  ( __DEV__ )  { 
985-       if  ( isReactElementOrArrayLike ( value ) ) { 
986-         const  debugInfo  =  chunk . _debugInfo . splice ( 0 ) ; 
987-         if  ( value . _debugInfo )  { 
988-           // $FlowFixMe[method-unbinding] 
989-           value. _debugInfo . push . apply ( value . _debugInfo ,  debugInfo ) ; 
990-         }  else { 
991-           Object . defineProperty ( value ,  '_debugInfo' ,  { 
992-             configurable : false , 
993-             enumerable : false , 
994-             writable : true , 
995-             value : debugInfo , 
996-           } ) ; 
997-         } 
984+     if  ( __DEV__  &&  isReactElementOrArrayLike ( value ) )  { 
985+       const  debugInfo  =  chunk . _debugInfo . splice ( 0 ) ; 
986+       if  ( value . _debugInfo )  { 
987+         // $FlowFixMe[method-unbinding] 
988+         value. _debugInfo . push . apply ( value . _debugInfo ,  debugInfo ) ; 
989+       }  else { 
990+         Object . defineProperty ( value ,  '_debugInfo' ,  { 
991+           configurable : false , 
992+           enumerable : false , 
993+           writable : true , 
994+           value : debugInfo , 
995+         } ) ; 
998996      } 
999997    } 
1000998
@@ -1185,7 +1183,7 @@ function initializeElement(
11851183    initializeFakeStack ( response ,  owner ) ; 
11861184  } 
11871185
1188-   if  ( lazyNode )  { 
1186+   if  ( lazyNode   !==   null )  { 
11891187    // In case the JSX runtime has validated the lazy type as a static child, we 
11901188    // need to transfer this information to the element. 
11911189    if  ( 
@@ -1901,17 +1899,15 @@ function transferReferencedDebugInfo(
19011899    // if the root is rendered as is. 
19021900    if  ( parentChunk  !==  null ) { 
19031901      const  referencedDebugInfo  =  referencedChunk . _debugInfo ; 
1904-       if  ( referencedDebugInfo  !==  null )  { 
1905-         const  parentDebugInfo =  parentChunk . _debugInfo ; 
1906-         for  ( let  i  =  0 ;  i  <  referencedDebugInfo . length ;  ++ i )  { 
1907-           const  debugInfoEntry =  referencedDebugInfo [ i ] ; 
1908-           if  ( debugInfoEntry . name  !=  null )  { 
1909-             ( debugInfoEntry : ReactComponentInfo ) ; 
1910-             // We're not transferring Component info since we use Component info 
1911-             // in Debug info to fill in gaps between Fibers for the parent stack. 
1912-           }  else  { 
1913-             parentDebugInfo. push ( debugInfoEntry ) ; 
1914-           } 
1902+       const  parentDebugInfo  =  parentChunk . _debugInfo ; 
1903+       for  ( let  i  =  0 ;  i  <  referencedDebugInfo . length ;  ++ i )  { 
1904+         const  debugInfoEntry =  referencedDebugInfo [ i ] ; 
1905+         if  ( debugInfoEntry . name  !=  null )  { 
1906+           ( debugInfoEntry : ReactComponentInfo ) ; 
1907+           // We're not transferring Component info since we use Component info 
1908+           // in Debug info to fill in gaps between Fibers for the parent stack. 
1909+         }  else  { 
1910+           parentDebugInfo. push ( debugInfoEntry ) ; 
19151911        } 
19161912      } 
19171913    } 
0 commit comments