Skip to content

Commit 1c9926f

Browse files
committed
handle <component> as fragment instance
1 parent e614d9c commit 1c9926f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/compiler/transclude.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ function transcludeTemplate (el, options) {
7070
frag.childNodes.length > 1 ||
7171
// non-element template
7272
replacer.nodeType !== 1 ||
73-
// when root node is <content>, <partial> or has
74-
// v-repeat, the instance could end up having
73+
// when root node is <content>, <partial>, <component>
74+
// or has v-repeat, the instance could end up having
7575
// multiple top-level nodes, thus becoming a block
7676
// instance.
77-
tag === 'content' || tag === 'partial' ||
77+
tag === 'content' ||
78+
tag === 'partial' ||
79+
tag === 'component' ||
7880
replacer.hasAttribute(config.prefix + 'repeat')
7981
) {
8082
return frag

0 commit comments

Comments
 (0)