@@ -789,6 +789,7 @@ function createChildReconciler(
789789 // We treat the parent as the owner for stack purposes.
790790 created . _debugOwner = returnFiber ;
791791 created . _debugTask = returnFiber . _debugTask ;
792+ // Make sure to not push again when handling the Fragment child.
792793 const prevDebugInfo = pushDebugInfo ( newChild . _debugInfo ) ;
793794 created . _debugInfo = currentDebugInfo ;
794795 currentDebugInfo = prevDebugInfo ;
@@ -1915,41 +1916,41 @@ function createChildReconciler(
19151916 }
19161917
19171918 if ( isArray ( newChild ) ) {
1918- const prevDebugInfo = pushDebugInfo ( newChild . _debugInfo ) ;
1919+ // We created a Fragment for this child with the debug info.
1920+ // No need to push again.
19191921 const firstChild = reconcileChildrenArray (
19201922 returnFiber ,
19211923 currentFirstChild ,
19221924 newChild ,
19231925 lanes ,
19241926 ) ;
1925- currentDebugInfo = prevDebugInfo ;
19261927 return firstChild ;
19271928 }
19281929
19291930 if ( getIteratorFn ( newChild ) ) {
1930- const prevDebugInfo = pushDebugInfo ( newChild . _debugInfo ) ;
1931+ // We created a Fragment for this child with the debug info.
1932+ // No need to push again.
19311933 const firstChild = reconcileChildrenIteratable (
19321934 returnFiber ,
19331935 currentFirstChild ,
19341936 newChild ,
19351937 lanes ,
19361938 ) ;
1937- currentDebugInfo = prevDebugInfo ;
19381939 return firstChild ;
19391940 }
19401941
19411942 if (
19421943 enableAsyncIterableChildren &&
19431944 typeof newChild [ ASYNC_ITERATOR ] === 'function'
19441945 ) {
1945- const prevDebugInfo = pushDebugInfo ( newChild . _debugInfo ) ;
1946+ // We created a Fragment for this child with the debug info.
1947+ // No need to push again.
19461948 const firstChild = reconcileChildrenAsyncIteratable (
19471949 returnFiber ,
19481950 currentFirstChild ,
19491951 newChild ,
19501952 lanes ,
19511953 ) ;
1952- currentDebugInfo = prevDebugInfo ;
19531954 return firstChild ;
19541955 }
19551956
0 commit comments