Skip to content

Commit 5dc00d6

Browse files
authored
[Fizz] Reset Instructions on ResumableState (facebook#33046)
When we end up creating an incomplete state in the shell we end up not flushing anything. As a hack, in this case we need to reset the ResumableState because some of the ResumableState is still relevant (e.g. any preloads that went into headers) but some of the ResumableState needs to be reset since they assume that what we produced actually flushed. We didn't reset the instructions state but we haven't actually flushed any of the instructions so it needs to reset.
1 parent c498bfc commit 5dc00d6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js

+1
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ export function resetResumableState(
695695
resumableState.scriptResources = {};
696696
resumableState.moduleUnknownResources = {};
697697
resumableState.moduleScriptResources = {};
698+
resumableState.instructions = NothingSent; // Nothing was flushed so no instructions could've flushed.
698699
}
699700

700701
export function completeResumableState(resumableState: ResumableState): void {

0 commit comments

Comments
 (0)