@@ -2884,56 +2884,40 @@ function commitPassiveMountOnFiber(
28842884 if ( queue !== null ) {
28852885 if ( isFallback ) {
28862886 const transitions = queue . transitions ;
2887- let prevTransitions = instance . transitions ;
2888- if ( instance . pendingMarkers === null ) {
2889- instance . pendingMarkers = new Set ( ) ;
2890- }
2891- if ( transitions !== null && prevTransitions === null ) {
2892- instance . transitions = prevTransitions = new Set ( ) ;
2893- }
2894-
28952887 if ( transitions !== null ) {
28962888 transitions . forEach ( transition => {
28972889 // Add all the transitions saved in the update queue during
28982890 // the render phase (ie the transitions associated with this boundary)
28992891 // into the transitions set.
2900- if ( prevTransitions === null ) {
2901- // TODO: What if prevTransitions is null?
2902- } else {
2903- prevTransitions . add ( transition ) ;
2892+ if ( instance . transitions === null ) {
2893+ instance . transitions = new Set ( ) ;
29042894 }
2895+ instance . transitions . add ( transition ) ;
29052896 } ) ;
29062897 }
29072898
29082899 const markerInstances = queue . markerInstances ;
29092900 if ( markerInstances !== null ) {
29102901 markerInstances . forEach ( markerInstance => {
2911- if ( markerInstance . pendingSuspenseBoundaries === null ) {
2912- markerInstance . pendingSuspenseBoundaries = new Map ( ) ;
2913- }
2914-
29152902 const markerTransitions = markerInstance . transitions ;
29162903 // There should only be a few tracing marker transitions because
29172904 // they should be only associated with the transition that
29182905 // caused them
29192906 if ( markerTransitions !== null ) {
29202907 markerTransitions . forEach ( transition => {
29212908 if ( instance . transitions === null ) {
2922- // TODO: What if instance.transitions is null?
2923- } else {
2924- if ( instance . transitions . has ( transition ) ) {
2925- if (
2926- instance . pendingMarkers === null ||
2927- markerInstance . pendingSuspenseBoundaries === null
2928- ) {
2929- // TODO: What if instance.pendingMarkers is null?
2930- // TODO: What if markerInstance.pendingSuspenseBoundaries is null?
2931- } else {
2932- instance . pendingMarkers . add (
2933- markerInstance . pendingSuspenseBoundaries ,
2934- ) ;
2935- }
2909+ instance . transitions = new Set ( ) ;
2910+ } else if ( instance . transitions . has ( transition ) ) {
2911+ if ( markerInstance . pendingSuspenseBoundaries === null ) {
2912+ markerInstance . pendingSuspenseBoundaries = new Map ( ) ;
2913+ }
2914+ if ( instance . pendingMarkers === null ) {
2915+ instance . pendingMarkers = new Set ( ) ;
29362916 }
2917+
2918+ instance . pendingMarkers . add (
2919+ markerInstance . pendingSuspenseBoundaries ,
2920+ ) ;
29372921 }
29382922 } ) ;
29392923 }
0 commit comments