Skip to content

Commit 4078206

Browse files
committed
fix(runtime-vapor): attach scope id only to root sub-element
1 parent de3a611 commit 4078206

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/runtime-vapor/src/apiCreateComponent.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ export function createComponent(
3131
once,
3232
)
3333

34-
instance.scopeIds = [...current.scopeIds]
34+
if (singleRoot) {
35+
instance.scopeIds.push(...current.scopeIds)
36+
}
3537
const scopeId = current.type.__scopeId
36-
if (scopeId) instance.scopeIds.push(scopeId)
38+
if (scopeId) {
39+
instance.scopeIds.push(scopeId)
40+
}
3741

3842
setupComponent(instance)
3943

0 commit comments

Comments
 (0)