Skip to content

Commit b6800b9

Browse files
committed
fix(TransitionGroup): reset prevChildren to prevent memory leak
1 parent 4f6ef92 commit b6800b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/runtime-dom/src/components/TransitionGroup.ts

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ const TransitionGroupImpl: ComponentOptions = /*@__PURE__*/ decorate({
8181
moveClass,
8282
)
8383
) {
84+
prevChildren = []
8485
return
8586
}
8687

@@ -110,6 +111,7 @@ const TransitionGroupImpl: ComponentOptions = /*@__PURE__*/ decorate({
110111
})
111112
el.addEventListener('transitionend', cb)
112113
})
114+
prevChildren = []
113115
})
114116

115117
return () => {

0 commit comments

Comments
 (0)