From: Evan You Date: Mon, 2 Dec 2019 20:17:30 +0000 (-0500) Subject: fix(core): should not warn extraneous props when root is toggled X-Git-Tag: v3.0.0-alpha.0~111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a58da63f162da95cb50935adefeb1a12a95876c1;p=thirdparty%2Fvuejs%2Fcore.git fix(core): should not warn extraneous props when root is toggled --- diff --git a/packages/runtime-core/src/componentRenderUtils.ts b/packages/runtime-core/src/componentRenderUtils.ts index 3b54dd4376..db8bd527eb 100644 --- a/packages/runtime-core/src/componentRenderUtils.ts +++ b/packages/runtime-core/src/componentRenderUtils.ts @@ -75,7 +75,7 @@ export function renderComponentRoot( result.shapeFlag & ShapeFlags.COMPONENT ) { result = cloneVNode(result, attrs) - } else if (__DEV__ && !accessedAttrs) { + } else if (__DEV__ && !accessedAttrs && result.type !== Comment) { warn( `Extraneous non-props attributes (${Object.keys(attrs).join(',')}) ` + `were passed to component but could not be automatically inherited ` +