File tree 1 file changed +8
-6
lines changed
packages/runtime-dom/src/components
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -174,9 +174,11 @@ export function resolveTransitionProps(
174
174
done && done ( )
175
175
}
176
176
177
- let isLeaving = false
178
- const finishLeave = ( el : Element , done ?: ( ) => void ) => {
179
- isLeaving = false
177
+ const finishLeave = (
178
+ el : Element & { _isLeaving ?: boolean } ,
179
+ done ?: ( ) => void
180
+ ) => {
181
+ el . _isLeaving = false
180
182
removeTransitionClass ( el , leaveFromClass )
181
183
removeTransitionClass ( el , leaveToClass )
182
184
removeTransitionClass ( el , leaveActiveClass )
@@ -223,8 +225,8 @@ export function resolveTransitionProps(
223
225
} ,
224
226
onEnter : makeEnterHook ( false ) ,
225
227
onAppear : makeEnterHook ( true ) ,
226
- onLeave ( el , done ) {
227
- isLeaving = true
228
+ onLeave ( el : Element & { _isLeaving ?: boolean } , done ) {
229
+ el . _isLeaving = true
228
230
const resolve = ( ) => finishLeave ( el , done )
229
231
addTransitionClass ( el , leaveFromClass )
230
232
if ( __COMPAT__ && legacyClassEnabled ) {
@@ -234,7 +236,7 @@ export function resolveTransitionProps(
234
236
forceReflow ( )
235
237
addTransitionClass ( el , leaveActiveClass )
236
238
nextFrame ( ( ) => {
237
- if ( ! isLeaving ) {
239
+ if ( ! el . _isLeaving ) {
238
240
// cancelled
239
241
return
240
242
}
You can’t perform that action at this time.
0 commit comments