Skip to content

Commit

Permalink
fix: destroy non-fragment element such as empty components
Browse files Browse the repository at this point in the history
  • Loading branch information
magentaqin committed Apr 29, 2022
1 parent 11ada98 commit 429e576
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/runtime/internal/transitions.ts
Expand Up @@ -79,6 +79,9 @@ export function transition_out(block: Fragment, local: 0 | 1, detach?: 0 | 1, ca
});

block.o(local);
// fix: destroy non-fragment element such as empty components.
} else if (typeof callback === 'function') {
callback();
}
}

Expand Down Expand Up @@ -143,7 +146,7 @@ export function create_in_transition(node: Element & ElementCSSInlineStyle, fn:
return {
start() {
if (started) return;

started = true;
delete_rule(node);

Expand Down

0 comments on commit 429e576

Please sign in to comment.