mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[Fiber] Fix missing render times when we cancel a pending commit (#31065)
This commit is contained in:
parent
0f1856c49f
commit
778e1ed2e5
|
|
@ -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.',
|
||||
|
|
|
|||
|
|
@ -1308,6 +1308,8 @@ function commitRootWhenReady(
|
|||
updatedLanes,
|
||||
suspendedRetryLanes,
|
||||
SUSPENDED_COMMIT,
|
||||
completedRenderStartTime,
|
||||
completedRenderEndTime,
|
||||
),
|
||||
);
|
||||
const didAttemptEntireTree = !didSkipSuspendedSiblings;
|
||||
|
|
@ -3001,8 +3003,6 @@ function commitRoot(
|
|||
ReactSharedInternals.T = prevTransition;
|
||||
setCurrentUpdatePriority(previousUpdateLanePriority);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function commitRootImpl(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user