Skip to content

Commit

Permalink
fix(runtime-vapor): attach scope id only to root sub-element
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Nov 15, 2024
1 parent de3a611 commit 4078206
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/runtime-vapor/src/apiCreateComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ export function createComponent(
once,
)

instance.scopeIds = [...current.scopeIds]
if (singleRoot) {
instance.scopeIds.push(...current.scopeIds)
}
const scopeId = current.type.__scopeId
if (scopeId) instance.scopeIds.push(scopeId)
if (scopeId) {
instance.scopeIds.push(scopeId)
}

setupComponent(instance)

Expand Down

0 comments on commit 4078206

Please sign in to comment.