Skip to content

Commit

Permalink
[Fiber] Fix missing render times when we cancel a pending commit (#31065
Browse files Browse the repository at this point in the history
)
  • Loading branch information
eps1lon authored Sep 25, 2024
1 parent 0f1856c commit 778e1ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3401,7 +3401,7 @@ export function suspendResource(
}
}

export function waitForCommitToBeReady(): null | (Function => Function) {
export function waitForCommitToBeReady(): null | ((() => void) => () => void) {
if (suspendedState === null) {
throw new Error(
'Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.',
Expand Down
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberWorkLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,8 @@ function commitRootWhenReady(
updatedLanes,
suspendedRetryLanes,
SUSPENDED_COMMIT,
completedRenderStartTime,
completedRenderEndTime,
),
);
const didAttemptEntireTree = !didSkipSuspendedSiblings;
Expand Down Expand Up @@ -3001,8 +3003,6 @@ function commitRoot(
ReactSharedInternals.T = prevTransition;
setCurrentUpdatePriority(previousUpdateLanePriority);
}

return null;
}

function commitRootImpl(
Expand Down

0 comments on commit 778e1ed

Please sign in to comment.