Skip to content

Commit 429e576

Browse files
author
magentaqin
committed
fix: destroy non-fragment element such as empty components
1 parent 11ada98 commit 429e576

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/runtime/internal/transitions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export function transition_out(block: Fragment, local: 0 | 1, detach?: 0 | 1, ca
7979
});
8080

8181
block.o(local);
82+
// fix: destroy non-fragment element such as empty components.
83+
} else if (typeof callback === 'function') {
84+
callback();
8285
}
8386
}
8487

@@ -143,7 +146,7 @@ export function create_in_transition(node: Element & ElementCSSInlineStyle, fn:
143146
return {
144147
start() {
145148
if (started) return;
146-
149+
147150
started = true;
148151
delete_rule(node);
149152

0 commit comments

Comments
 (0)