flushing_sync -> is_flushing_sync

pull/16482/head
Rich Harris 2 months ago
parent f68635595c
commit a98c75ea31

@ -69,7 +69,7 @@ let last_scheduled_effect = null;
let is_flushing = false; let is_flushing = false;
let flushing_sync = false; let is_flushing_sync = false;
export class Batch { export class Batch {
/** /**
@ -411,7 +411,7 @@ export class Batch {
const batch = (current_batch = new Batch()); const batch = (current_batch = new Batch());
batches.add(current_batch); batches.add(current_batch);
if (!flushing_sync) { if (!is_flushing_sync) {
Batch.enqueue(() => { Batch.enqueue(() => {
if (current_batch !== batch) { if (current_batch !== batch) {
// a flushSync happened in the meantime // a flushSync happened in the meantime
@ -448,8 +448,8 @@ export function flushSync(fn) {
e.flush_sync_in_effect(); e.flush_sync_in_effect();
} }
var prev_flushing_sync = flushing_sync; var prev_flushing_sync = is_flushing_sync;
flushing_sync = true; is_flushing_sync = true;
try { try {
var result; var result;
@ -484,7 +484,7 @@ export function flushSync(fn) {
batch.flush_effects(); batch.flush_effects();
} }
} finally { } finally {
flushing_sync = prev_flushing_sync; is_flushing_sync = prev_flushing_sync;
} }
} }

Loading…
Cancel
Save