cleanup a bunch of internal runtime logic (#10446)

pull/10449/head
Dominic Gannaway 9 months ago committed by GitHub
parent 89123a8117
commit 1366932dc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1091,7 +1091,7 @@ export function mark_subtree_inert(signal, inert, visited_blocks = new Set()) {
if (type === IF_BLOCK) {
const condition_effect = block.e;
if (condition_effect !== null && block !== current_block) {
mark_subtree_inert(condition_effect, inert);
mark_subtree_inert(condition_effect, inert, visited_blocks);
}
const consequent_effect = block.ce;
if (consequent_effect !== null && block.v) {

@ -649,12 +649,16 @@ export function trigger_transitions(transitions, target_direction, from) {
mark_subtree_inert(effect, false);
} else if (target_direction === 'key') {
if (direction === 'key') {
if (!transition.p) {
transition.p = transition.i(/** @type {DOMRect} */ (from));
}
transition.in();
}
} else {
if (direction === 'out' || direction === 'both') {
if (!transition.p) {
transition.p = transition.i();
}
outros.push(transition.o);
}
transition.d.inert = true;

@ -17,7 +17,7 @@ export default test({
component.visible = false;
// @ts-expect-error
assert.equal(global.count, 2);
assert.equal(global.count, 1);
raf.tick(500);
assert.equal(div.foo, 0.25);

Loading…
Cancel
Save