Skip to content

Commit ceab0b7

Browse files
committed
fix functional components that return string or nothing (fix #3919)
1 parent 7ca58b6 commit ceab0b7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/core/vdom/create-component.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@ function createFunctionalComponent (
113113
slots: () => resolveSlots(children, context)
114114
}
115115
)
116-
vnode.functionalContext = context
117-
if (data.slot) {
118-
(vnode.data || (vnode.data = {})).slot = data.slot
116+
if (vnode instanceof VNode) {
117+
vnode.functionalContext = context
118+
if (data.slot) {
119+
(vnode.data || (vnode.data = {})).slot = data.slot
120+
}
119121
}
120122
return vnode
121123
}

0 commit comments

Comments
 (0)