pull/17038/head
Rich Harris 4 weeks ago
parent 2e571e3dbf
commit 30b04a1e8c

@ -345,10 +345,14 @@ export function run(thunks) {
promises.push(promise);
}
promise.then(() => {
boundary.update_pending_count(-1);
batch.decrement(blocking);
});
promise
// wait one more tick, so that template effects are
// guaranteed to run before `$effect(...)`
.then(() => Promise.resolve())
.then(() => {
boundary.update_pending_count(-1);
batch.decrement(blocking);
});
return promises;
}

@ -68,8 +68,8 @@ export default test({
assert.deepEqual(logs, [
'outside boundary 1',
'$effect.pre 42 1',
'$effect 42 1',
'template 42 1',
'$effect 42 1',
'$effect.pre 84 2',
'template 84 2',
'outside boundary 2',

@ -34,8 +34,8 @@ export default test({
assert.deepEqual(logs, [
'outside boundary 1',
'$effect.pre 1a 1',
'$effect 1a 1',
'template 1a 1',
'$effect 1a 1',
'$effect.pre 2a 2',
'template 2a 2',
'outside boundary 2',

Loading…
Cancel
Save