From a58da63f162da95cb50935adefeb1a12a95876c1 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 2 Dec 2019 15:17:30 -0500 Subject: [PATCH] fix(core): should not warn extraneous props when root is toggled --- packages/runtime-core/src/componentRenderUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ` + -- 2.47.3