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) {
146146 // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
147147 if ( syncQueue === null ) {
148148 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.
149152 if ( enableSyncMicroTasks && supportsMicrotasks ) {
150153 // Flush the queue in a microtask.
151154 scheduleMicrotask ( flushSyncCallbackQueueImpl ) ;
152155 } 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.
156157 immediateQueueCallbackNode = Scheduler_scheduleCallback (
157158 Scheduler_ImmediatePriority ,
158159 flushSyncCallbackQueueImpl ,
Original file line number Diff line number Diff line change @@ -146,13 +146,14 @@ export function scheduleSyncCallback(callback: SchedulerCallback) {
146146 // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
147147 if ( syncQueue === null ) {
148148 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.
149152 if ( enableSyncMicroTasks && supportsMicrotasks ) {
150153 // Flush the queue in a microtask.
151154 scheduleMicrotask ( flushSyncCallbackQueueImpl ) ;
152155 } 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.
156157 immediateQueueCallbackNode = Scheduler_scheduleCallback (
157158 Scheduler_ImmediatePriority ,
158159 flushSyncCallbackQueueImpl ,
You can’t perform that action at this time.
0 commit comments