|
|
|
@ -608,6 +608,8 @@ function flush_effects() {
|
|
|
|
var was_updating_effect = is_updating_effect;
|
|
|
|
var was_updating_effect = is_updating_effect;
|
|
|
|
is_flushing = true;
|
|
|
|
is_flushing = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var source_stacks = DEV ? new Set() : null;
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
var flush_count = 0;
|
|
|
|
var flush_count = 0;
|
|
|
|
set_is_updating_effect(true);
|
|
|
|
set_is_updating_effect(true);
|
|
|
|
@ -633,8 +635,10 @@ function flush_effects() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (const update of updates.values()) {
|
|
|
|
for (const update of updates.values()) {
|
|
|
|
// eslint-disable-next-line no-console
|
|
|
|
if (update.error) {
|
|
|
|
console.error(update.error);
|
|
|
|
// eslint-disable-next-line no-console
|
|
|
|
|
|
|
|
console.error(update.error);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -643,12 +647,24 @@ function flush_effects() {
|
|
|
|
|
|
|
|
|
|
|
|
batch.process(queued_root_effects);
|
|
|
|
batch.process(queued_root_effects);
|
|
|
|
old_values.clear();
|
|
|
|
old_values.clear();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (DEV) {
|
|
|
|
|
|
|
|
for (const source of batch.current.keys()) {
|
|
|
|
|
|
|
|
/** @type {Set<Source>} */ (source_stacks).add(source);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
is_flushing = false;
|
|
|
|
is_flushing = false;
|
|
|
|
set_is_updating_effect(was_updating_effect);
|
|
|
|
set_is_updating_effect(was_updating_effect);
|
|
|
|
|
|
|
|
|
|
|
|
last_scheduled_effect = null;
|
|
|
|
last_scheduled_effect = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (DEV) {
|
|
|
|
|
|
|
|
for (const source of /** @type {Set<Source>} */ (source_stacks)) {
|
|
|
|
|
|
|
|
source.updated = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|