From: Evan You Date: Fri, 26 Jun 2020 21:54:44 +0000 (-0400) Subject: fix(runtime-core): component root should inherit scopeId from vnode X-Git-Tag: v3.0.0-beta.16~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3f94e4deb40d3a0d83804454874833b194f83da;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): component root should inherit scopeId from vnode fix #1399 --- diff --git a/packages/runtime-core/src/componentRenderUtils.ts b/packages/runtime-core/src/componentRenderUtils.ts index 060e07f71d..510f8b9af6 100644 --- a/packages/runtime-core/src/componentRenderUtils.ts +++ b/packages/runtime-core/src/componentRenderUtils.ts @@ -42,7 +42,6 @@ export function renderComponentRoot( ): VNode { const { type: Component, - parent, vnode, proxy, withProxy, @@ -149,9 +148,8 @@ export function renderComponentRoot( } // inherit scopeId - const parentScopeId = parent && parent.type.__scopeId - if (parentScopeId) { - root = cloneVNode(root, { [parentScopeId]: '' }) + if (vnode.scopeId) { + root = cloneVNode(root, { [vnode.scopeId]: '' }) } // inherit directives if (vnode.dirs) {