File tree 2 files changed +5
-5
lines changed
packages/runtime-core/src
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import { SchedulerJobFlags } from '../scheduler'
24
24
25
25
type Hook < T = ( ) => void > = T | T [ ]
26
26
27
- export const leaveCbKey : unique symbol = Symbol ( '_leaveCb' )
27
+ const leaveCbKey : unique symbol = Symbol ( '_leaveCb' )
28
28
const enterCbKey : unique symbol = Symbol ( '_enterCb' )
29
29
30
30
export interface BaseTransitionProps < HostElement = RendererElement > {
@@ -438,6 +438,9 @@ export function resolveTransitionHooks(
438
438
if ( el [ enterCbKey ] ) {
439
439
el [ enterCbKey ] ( true /* cancelled */ )
440
440
}
441
+ if ( el [ leaveCbKey ] ) {
442
+ el [ leaveCbKey ] ( )
443
+ }
441
444
if ( state . isUnmounting ) {
442
445
return remove ( )
443
446
}
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ import { initFeatureFlags } from './featureFlags'
85
85
import { isAsyncWrapper } from './apiAsyncComponent'
86
86
import { isCompatEnabled } from './compat/compatConfig'
87
87
import { DeprecationTypes } from './compat/compatConfig'
88
- import { type TransitionHooks , leaveCbKey } from './components/BaseTransition'
88
+ import type { TransitionHooks } from './components/BaseTransition'
89
89
90
90
export interface Renderer < HostElement = RendererElement > {
91
91
render : RootRenderFunction < HostElement >
@@ -2057,9 +2057,6 @@ function baseCreateRenderer(
2057
2057
}
2058
2058
}
2059
2059
const performLeave = ( ) => {
2060
- if ( el ! . _isLeaving ) {
2061
- el ! [ leaveCbKey ] ( true /* cancelled */ )
2062
- }
2063
2060
leave ( el ! , ( ) => {
2064
2061
remove ( )
2065
2062
afterLeave && afterLeave ( )
You can’t perform that action at this time.
0 commit comments