Skip to content

Commit 18555c3

Browse files
committed
Fix comment
1 parent 4cea1e0 commit 18555c3

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

packages/react-reconciler/src/SchedulerWithReactIntegration.new.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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,

packages/react-reconciler/src/SchedulerWithReactIntegration.old.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)