pull/10798/head
Rich Harris 2 years ago
parent 080078d9e8
commit bb4f414158

@ -78,7 +78,7 @@ export function await_block(anchor_node, get_input, pending_fn, then_fn, catch_f
set_current_reaction(null); set_current_reaction(null);
set_current_effect(null); set_current_effect(null);
flushSync(); // TODO remove this, just flush at the end of the then/catch flushSync();
return effect; return effect;
} }
@ -122,8 +122,6 @@ export function await_block(anchor_node, get_input, pending_fn, then_fn, catch_f
.then((value) => { .then((value) => {
if (promise !== input) return; if (promise !== input) return;
flushSync(); // TODO this feels weird but is apparently necessary (should it go at the bottom?)
if (pending_effect) { if (pending_effect) {
pause(pending_effect, pending_block); pause(pending_effect, pending_block);
} }
@ -137,8 +135,6 @@ export function await_block(anchor_node, get_input, pending_fn, then_fn, catch_f
promise.catch((error) => { promise.catch((error) => {
if (promise !== input) return; if (promise !== input) return;
flushSync(); // TODO this feels weird but is apparently necessary
if (pending_effect) { if (pending_effect) {
pause(pending_effect, pending_block); pause(pending_effect, pending_block);
} }

Loading…
Cancel
Save