Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const cssTransitionProps = resolveTransitionProps(rawProps)
const tag = rawProps.tag || Fragment
prevChildren = children
children = slots.default ? slots.default() : []
// handle fragment children case, e.g. v-for
if (children.length === 1 && children[0].type === Fragment) {
children = children[0].children as VNode[]
}
for (let i = 0; i < children.length; i++) {
const child = children[i]
if (child.key != null) {
setTransitionHooks(
child,
resolveTransitionHooks(child, cssTransitionProps, state, instance)
)
} else if (__DEV__) {
warn(` children must be keyed.`)
}
}
if (prevChildren) {
for (let i = 0; i < prevChildren.length; i++) {
const child = prevChildren[i]
setTransitionHooks(
child,
resolveTransitionHooks(child, cssTransitionProps, state, instance)
)
positionMap.set(child, child.el.getBoundingClientRect())
}
}