File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -146,13 +146,14 @@ export function scheduleSyncCallback(callback: SchedulerCallback) {
146
146
// the next tick, or earlier if something calls `flushSyncCallbackQueue`.
147
147
if ( syncQueue === null ) {
148
148
syncQueue = [ callback ] ;
149
+
150
+ // TODO: Figure out how to remove this It's only here as a last resort if we
151
+ // forget to explicitly flush.
149
152
if ( enableSyncMicroTasks && supportsMicrotasks ) {
150
153
// Flush the queue in a microtask.
151
154
scheduleMicrotask ( flushSyncCallbackQueueImpl ) ;
152
155
} else {
153
- // Flush the queue in the next tick, at the earliest.
154
- // TODO: Figure out how to remove this It's only here as a last resort if we
155
- // forget to explicitly flush.
156
+ // Flush the queue in the next tick.
156
157
immediateQueueCallbackNode = Scheduler_scheduleCallback (
157
158
Scheduler_ImmediatePriority ,
158
159
flushSyncCallbackQueueImpl ,
Original file line number Diff line number Diff line change @@ -146,13 +146,14 @@ export function scheduleSyncCallback(callback: SchedulerCallback) {
146
146
// the next tick, or earlier if something calls `flushSyncCallbackQueue`.
147
147
if ( syncQueue === null ) {
148
148
syncQueue = [ callback ] ;
149
+
150
+ // TODO: Figure out how to remove this It's only here as a last resort if we
151
+ // forget to explicitly flush.
149
152
if ( enableSyncMicroTasks && supportsMicrotasks ) {
150
153
// Flush the queue in a microtask.
151
154
scheduleMicrotask ( flushSyncCallbackQueueImpl ) ;
152
155
} else {
153
- // Flush the queue in the next tick, at the earliest.
154
- // TODO: Figure out how to remove this It's only here as a last resort if we
155
- // forget to explicitly flush.
156
+ // Flush the queue in the next tick.
156
157
immediateQueueCallbackNode = Scheduler_scheduleCallback (
157
158
Scheduler_ImmediatePriority ,
158
159
flushSyncCallbackQueueImpl ,
You can’t perform that action at this time.
0 commit comments