@@ -367,20 +367,6 @@ export function computeExpirationForFiber(
367367 return expirationTime ;
368368}
369369
370- let lastUniqueAsyncExpiration = NoWork ;
371- export function computeUniqueAsyncExpiration ( ) : ExpirationTime {
372- const currentTime = requestCurrentTime ( ) ;
373- let result = computeAsyncExpiration ( currentTime ) ;
374- if ( result <= lastUniqueAsyncExpiration ) {
375- // Since we assume the current time monotonically increases, we only hit
376- // this branch when computeUniqueAsyncExpiration is fired multiple times
377- // within a 200ms window (or whatever the async bucket size is).
378- result -= 1 ;
379- }
380- lastUniqueAsyncExpiration = result ;
381- return result ;
382- }
383-
384370export function scheduleUpdateOnFiber (
385371 fiber : Fiber ,
386372 expirationTime : ExpirationTime ,
@@ -1080,16 +1066,11 @@ function finishSyncRender(root, exitStatus, expirationTime) {
10801066}
10811067
10821068export function flushRoot ( root : FiberRoot , expirationTime : ExpirationTime ) {
1083- if ( ( executionContext & ( RenderContext | CommitContext ) ) !== NoContext ) {
1084- invariant (
1085- false ,
1086- 'work.commit(): Cannot commit while already rendering. This likely ' +
1087- 'means you attempted to commit from inside a lifecycle method.' ,
1088- ) ;
1089- }
10901069 markRootExpiredAtTime ( root , expirationTime ) ;
10911070 ensureRootIsScheduled ( root ) ;
1092- flushSyncCallbackQueue ( ) ;
1071+ if ( ( executionContext & ( RenderContext | CommitContext ) ) === NoContext ) {
1072+ flushSyncCallbackQueue ( ) ;
1073+ }
10931074}
10941075
10951076export function flushDiscreteUpdates ( ) {
0 commit comments