-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outro transition not playing if inside #if #each #2689
Comments
I think the problem in the generated code is: // (10:0) {#if checked}
function create_if_block(ctx) {
...
function outro_block(i, detaching, local) {
if (each_blocks[i]) {
if (detaching) {
on_outro(() => {
each_blocks[i].d(detaching);
each_blocks[i] = null;
});
}
each_blocks[i].o(local);
}
}
return {
...
o: function outro(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < 1; i += 1) outro_block(i, 0);
for (let i = 0; i < 1; i += 1) outro_block(i, 0, local); Update: no it shouldn't it should be: for (let i = 0; i < 1; i += 1) outro_block(i, 0, 0); but that won't fix the problem, that's in another file: svelte/src/compile/render-dom/wrappers/Element/index.ts Lines 736 to 746 in 43f82af
always adding the if(local) because the check if (outro_block) is wrong, it's clear when looking at the intro code:svelte/src/compile/render-dom/wrappers/Element/index.ts Lines 709 to 715 in 43f82af
|
I think it's generated here:
|
However changing this, 4 runtime tests will fail (or 8 with hydrate):
The tests are:
|
I would expect all items to have the same intro en outro effect, see the bug in action in this REPL demo in version
3.2.0
.The code:
The text was updated successfully, but these errors were encountered: