Skip to content

Commit 542e401

Browse files
committed
fix: mark single root for transition block
1 parent cb8830f commit 542e401

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/runtime-vapor/src/components/Transition.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ export const VaporTransition: FunctionalVaporComponent = /*@__PURE__*/ decorate(
7474
const resolvedAttrs = extend({}, attrs)
7575
const child = findTransitionBlock(children)
7676
if (child) {
77+
// mark single root
78+
;(child as any).$root = true
79+
7780
applyFallthroughProps(child, resolvedAttrs)
7881
// ensure fallthrough attrs are not happened again in
7982
// applyTransitionHooks
@@ -189,6 +192,8 @@ export function applyTransitionHooks(
189192

190193
// fallthrough attrs
191194
if (fallthroughAttrs && instance.hasFallthrough) {
195+
// mark single root
196+
;(child as any).$root = true
192197
applyFallthroughProps(child, instance.attrs)
193198
}
194199

packages/runtime-vapor/src/components/TransitionGroup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ export const VaporTransitionGroup: ObjectVaporComponent = decorate({
153153
insert(slottedBlock, container)
154154
// fallthrough attrs
155155
if (instance!.hasFallthrough) {
156+
;(container as any).$root = true
156157
renderEffect(() => applyFallthroughProps(container, instance!.attrs))
157158
}
158159
return container

0 commit comments

Comments
 (0)