Browse Source

fix functional components that return string or nothing (fix #3919)

dev
Evan You 8 years ago
parent
commit
ceab0b71d0
  1. 2
      src/core/vdom/create-component.js

2
src/core/vdom/create-component.js

@ -113,10 +113,12 @@ function createFunctionalComponent (
slots: () => resolveSlots(children, context)
}
)
if (vnode instanceof VNode) {
vnode.functionalContext = context
if (data.slot) {
(vnode.data || (vnode.data = {})).slot = data.slot
}
}
return vnode
}

Loading…
Cancel
Save