@@ -75,7 +75,7 @@ import {
75
75
getCurrentPriorityLevel ,
76
76
} from './SchedulerWithReactIntegration' ;
77
77
import {
78
- getFirstPendingExpirationTime ,
78
+ getLastPendingExpirationTime ,
79
79
getWorkInProgressVersion ,
80
80
markSourceAsDirty ,
81
81
setPendingExpirationTime ,
@@ -916,7 +916,7 @@ function readFromUnsubcribedMutableSource<Source, Snapshot>(
916
916
isSafeToReadFromSource = currentRenderVersion === version ;
917
917
} else {
918
918
// If there's no version, then we should fallback to checking the update time.
919
- const pendingExpirationTime = getFirstPendingExpirationTime ( root ) ;
919
+ const pendingExpirationTime = getLastPendingExpirationTime ( root ) ;
920
920
921
921
if ( pendingExpirationTime === NoWork ) {
922
922
isSafeToReadFromSource = true ;
@@ -1040,7 +1040,7 @@ function useMutableSource<Source, Snapshot>(
1040
1040
// There is no mechanism currently to associate these updates though,
1041
1041
// so for now we fall back to synchronously flushing all pending updates.
1042
1042
// TODO: Improve this later.
1043
- markRootExpiredAtTime ( root , getFirstPendingExpirationTime ( root ) ) ;
1043
+ markRootExpiredAtTime ( root , getLastPendingExpirationTime ( root ) ) ;
1044
1044
}
1045
1045
}
1046
1046
}
@@ -1108,7 +1108,7 @@ function useMutableSource<Source, Snapshot>(
1108
1108
// We missed a mutation before committing.
1109
1109
// It's possible that other components using this source also have pending updates scheduled.
1110
1110
// In that case, we should ensure they all commit together.
1111
- markRootExpiredAtTime ( root , getFirstPendingExpirationTime ( root ) ) ;
1111
+ markRootExpiredAtTime ( root , getLastPendingExpirationTime ( root ) ) ;
1112
1112
}
1113
1113
}
1114
1114
0 commit comments