]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(core): should not warn extraneous props when root is toggled
authorEvan You <yyx990803@gmail.com>
Mon, 2 Dec 2019 20:17:30 +0000 (15:17 -0500)
committerEvan You <yyx990803@gmail.com>
Mon, 2 Dec 2019 20:17:30 +0000 (15:17 -0500)
packages/runtime-core/src/componentRenderUtils.ts

index 3b54dd437690e2df4873ce4c919142c6f8213301..db8bd527eb4b99106ea46dda35aed5a326f7576f 100644 (file)
@@ -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 ` +