Skip to content

Commit cc4b431

Browse files
authored
Mark boundary as client rendered even if aborting fallback (#21294)
1 parent f7cdc89 commit cc4b431

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

packages/react-server/src/ReactFizzServer.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,22 +1245,18 @@ function abortTask(task: Task): void {
12451245
} else {
12461246
boundary.pendingTasks--;
12471247

1248-
if (boundary.fallbackAbortableTasks.size > 0) {
1249-
// If this boundary was still pending then we haven't already cancelled its fallbacks.
1250-
// We'll need to abort the fallbacks, which will also error that parent boundary.
1251-
// This means that we don't have to client render this boundary because its parent
1252-
// will be client rendered anyway.
1253-
boundary.fallbackAbortableTasks.forEach(abortTask, request);
1254-
boundary.fallbackAbortableTasks.clear();
1255-
} else {
1256-
if (!boundary.forceClientRender) {
1257-
boundary.forceClientRender = true;
1258-
if (boundary.parentFlushed) {
1259-
request.clientRenderedBoundaries.push(boundary);
1260-
}
1248+
if (!boundary.forceClientRender) {
1249+
boundary.forceClientRender = true;
1250+
if (boundary.parentFlushed) {
1251+
request.clientRenderedBoundaries.push(boundary);
12611252
}
12621253
}
12631254

1255+
// If this boundary was still pending then we haven't already cancelled its fallbacks.
1256+
// We'll need to abort the fallbacks, which will also error that parent boundary.
1257+
boundary.fallbackAbortableTasks.forEach(abortTask, request);
1258+
boundary.fallbackAbortableTasks.clear();
1259+
12641260
request.allPendingTasks--;
12651261
if (request.allPendingTasks === 0) {
12661262
const onCompleteAll = request.onCompleteAll;

0 commit comments

Comments
 (0)