Skip to content

Commit b0a175b

Browse files
committed
abort fallback task on abort
1 parent 9a98ed5 commit b0a175b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/react-server/src/ReactFizzServer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,6 +2515,11 @@ export function abort(request: Request, reason: mixed): void {
25152515
abortableTasks.forEach(task => abortTask(task, request, error));
25162516
abortableTasks.clear();
25172517
}
2518+
const fallbackTask = request.fallbackTask;
2519+
if (fallbackTask) {
2520+
request.fallbackTask = null;
2521+
abortTaskSoft.call(request, fallbackTask);
2522+
}
25182523
if (request.destination !== null) {
25192524
flushCompletedQueues(request, request.destination);
25202525
}

0 commit comments

Comments
 (0)