experiment_s
Rich Harris 1 day ago
parent 4ef2be3a5d
commit 278c49056d

@ -111,6 +111,10 @@ export function boundary(node, props, boundary_fn) {
if (suspend_count++ === 0) { if (suspend_count++ === 0) {
queue_micro_task(() => { queue_micro_task(() => {
if (suspended_effect) {
return;
}
var effect = boundary_effect; var effect = boundary_effect;
suspended_effect = boundary_effect; suspended_effect = boundary_effect;
@ -149,14 +153,20 @@ export function boundary(node, props, boundary_fn) {
return false; return false;
} }
if (--suspend_count === 0 && suspended_effect !== null) { if (--suspend_count === 0) {
if (boundary_effect) { queue_micro_task(() => {
destroy_effect(boundary_effect); if (!suspended_effect) {
} return;
boundary_effect = suspended_effect; }
suspended_effect = null;
anchor.before(/** @type {DocumentFragment} */ (suspended_fragment)); if (boundary_effect) {
resume_effect(boundary_effect); destroy_effect(boundary_effect);
}
boundary_effect = suspended_effect;
suspended_effect = null;
anchor.before(/** @type {DocumentFragment} */ (suspended_fragment));
resume_effect(boundary_effect);
});
} }
return true; return true;

Loading…
Cancel
Save