File tree 2 files changed +5
-2
lines changed
packages/runtime-core/src
2 files changed +5
-2
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
- const leaveCbKey : unique symbol = Symbol ( '_leaveCb' )
27
+ export const leaveCbKey : unique symbol = Symbol ( '_leaveCb' )
28
28
const enterCbKey : unique symbol = Symbol ( '_enterCb' )
29
29
30
30
export interface BaseTransitionProps < HostElement = RendererElement > {
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 } from './components/BaseTransition'
88
+ import { type TransitionHooks , leaveCbKey } from './components/BaseTransition'
89
89
90
90
export interface Renderer < HostElement = RendererElement > {
91
91
render : RootRenderFunction < HostElement >
@@ -2057,6 +2057,9 @@ function baseCreateRenderer(
2057
2057
}
2058
2058
}
2059
2059
const performLeave = ( ) => {
2060
+ if ( el ! . _isLeaving ) {
2061
+ el ! [ leaveCbKey ] ( true /* cancelled */ )
2062
+ }
2060
2063
leave ( el ! , ( ) => {
2061
2064
remove ( )
2062
2065
afterLeave && afterLeave ( )
You can’t perform that action at this time.
0 commit comments