diff --git a/packages/react-dom/src/__tests__/ReactDOMFizzStaticBrowser-test.js b/packages/react-dom/src/__tests__/ReactDOMFizzStaticBrowser-test.js
index facfee69ad6f3..cfd63b6ec2b03 100644
--- a/packages/react-dom/src/__tests__/ReactDOMFizzStaticBrowser-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMFizzStaticBrowser-test.js
@@ -996,6 +996,11 @@ describe('ReactDOMFizzStaticBrowser', () => {
return children;
}
+ const lazySpan = React.lazy(async () => {
+ await 0;
+ return {default: };
+ })
+
function App() {
const children = (
@@ -1013,7 +1018,7 @@ describe('ReactDOMFizzStaticBrowser', () => {
) : (
-
+ lazySpan
)}
>
diff --git a/packages/react-server/src/ReactFizzServer.js b/packages/react-server/src/ReactFizzServer.js
index c44f9a2e6e1f8..ce2a1b0931f2c 100644
--- a/packages/react-server/src/ReactFizzServer.js
+++ b/packages/react-server/src/ReactFizzServer.js
@@ -3464,6 +3464,12 @@ function retryReplayTask(request: Request, task: ReplayTask): void {
task.replay.nodes,
task.replay.slots,
);
+ request.pendingRootTasks--;
+ if (request.pendingRootTasks === 0) {
+ request.onShellError = noop;
+ const onShellReady = request.onShellReady;
+ onShellReady();
+ }
request.allPendingTasks--;
if (request.allPendingTasks === 0) {
const onAllReady = request.onAllReady;