@@ -1019,11 +1019,7 @@ function replaySuspenseBoundary(
1019
1019
}
1020
1020
try {
1021
1021
// We use the safe form because we don't handle suspending here. Only error handling.
1022
- if ( typeof childSlots === 'number' ) {
1023
- resumeNode ( request , task , childSlots , content , - 1 ) ;
1024
- } else {
1025
- renderNode ( request , task , content , - 1 ) ;
1026
- }
1022
+ renderNode ( request , task , content , - 1 ) ;
1027
1023
if ( task . replay . pendingTasks === 1 && task . replay . nodes . length > 0 ) {
1028
1024
throw new Error (
1029
1025
"Couldn't find all resumable slots by key/index during replaying. " +
@@ -1089,53 +1085,25 @@ function replaySuspenseBoundary(
1089
1085
let suspendedFallbackTask ;
1090
1086
// We create suspended task for the fallback because we don't want to actually work
1091
1087
// on it yet in case we finish the main content, so we queue for later.
1092
- if ( typeof fallbackSlots === 'number ') {
1093
- // Resuming directly in the fallback.
1094
- const resumedSegment = createPendingSegment (
1095
- request ,
1096
- 0 ,
1097
- null ,
1098
- task . formatContext ,
1099
- false ,
1100
- false ,
1101
- ) ;
1102
- resumedSegment . id = fallbackSlots ;
1103
- resumedSegment . parentFlushed = true ;
1104
- suspendedFallbackTask = createRenderTask (
1105
- request ,
1106
- null ,
1107
- fallback ,
1108
- - 1 ,
1109
- parentBoundary ,
1110
- resumedSegment ,
1111
- fallbackAbortSet ,
1112
- fallbackKeyPath ,
1113
- task . formatContext ,
1114
- task . legacyContext ,
1115
- task . context ,
1116
- task . treeContext ,
1117
- ) ;
1118
- } else {
1119
- const fallbackReplay = {
1120
- nodes : fallbackNodes ,
1121
- slots : fallbackSlots ,
1122
- pendingTasks : 0 ,
1123
- } ;
1124
- suspendedFallbackTask = createReplayTask (
1125
- request ,
1126
- null ,
1127
- fallbackReplay ,
1128
- fallback ,
1129
- - 1 ,
1130
- parentBoundary ,
1131
- fallbackAbortSet ,
1132
- fallbackKeyPath ,
1133
- task . formatContext ,
1134
- task . legacyContext ,
1135
- task . context ,
1136
- task . treeContext ,
1137
- ) ;
1138
- }
1088
+ const fallbackReplay = {
1089
+ nodes : fallbackNodes ,
1090
+ slots : fallbackSlots ,
1091
+ pendingTasks : 0 ,
1092
+ } ;
1093
+ suspendedFallbackTask = createReplayTask(
1094
+ request,
1095
+ null,
1096
+ fallbackReplay,
1097
+ fallback,
1098
+ -1,
1099
+ parentBoundary,
1100
+ fallbackAbortSet,
1101
+ fallbackKeyPath,
1102
+ task.formatContext,
1103
+ task.legacyContext,
1104
+ task.context,
1105
+ task.treeContext,
1106
+ );
1139
1107
if (__DEV__) {
1140
1108
suspendedFallbackTask . componentStack = task . componentStack ;
1141
1109
}
0 commit comments