We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9873443 commit c582b5dCopy full SHA for c582b5d
packages/svelte/src/internal/client/runtime.js
@@ -858,19 +858,16 @@ export function flush_sync(fn) {
858
try {
859
infinite_loop_guard();
860
861
- /** @type {Effect[]} */
862
- const root_effects = [];
863
-
864
scheduler_mode = FLUSH_SYNC;
865
- queued_root_effects = root_effects;
+ queued_root_effects = [];
866
is_micro_task_queued = false;
867
868
flush_queued_root_effects(previous_queued_root_effects);
869
870
var result = fn?.();
871
872
flush_tasks();
873
- if (queued_root_effects.length > 0 || root_effects.length > 0) {
+ if (queued_root_effects.length > 0) {
874
flush_sync();
875
}
876
0 commit comments