Skip to content

Commit b41dba1

Browse files
royalknight56OnlyWick
authored andcommitted
refactor(transition): remove unused getTransitionKey logic (vuejs#10283)
1 parent d86a7cb commit b41dba1

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

packages/runtime-core/src/components/BaseTransition.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ const BaseTransitionImpl: ComponentOptions = {
144144
const instance = getCurrentInstance()!
145145
const state = useTransitionState()
146146

147-
let prevTransitionKey: any
148-
149147
return () => {
150148
const children =
151149
slots.default && getTransitionRawChildren(slots.default(), true)
@@ -211,23 +209,11 @@ const BaseTransitionImpl: ComponentOptions = {
211209
const oldChild = instance.subTree
212210
const oldInnerChild = oldChild && getKeepAliveChild(oldChild)
213211

214-
let transitionKeyChanged = false
215-
const { getTransitionKey } = innerChild.type as any
216-
if (getTransitionKey) {
217-
const key = getTransitionKey()
218-
if (prevTransitionKey === undefined) {
219-
prevTransitionKey = key
220-
} else if (key !== prevTransitionKey) {
221-
prevTransitionKey = key
222-
transitionKeyChanged = true
223-
}
224-
}
225-
226212
// handle mode
227213
if (
228214
oldInnerChild &&
229215
oldInnerChild.type !== Comment &&
230-
(!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)
216+
!isSameVNodeType(innerChild, oldInnerChild)
231217
) {
232218
const leavingHooks = resolveTransitionHooks(
233219
oldInnerChild,

0 commit comments

Comments
 (0)