fix(ssr): render components returning render function from setup (#720)

This commit is contained in:
Dmitry Sharshakov
2020-02-15 19:11:55 +03:00
committed by GitHub
parent a0163f1aa8
commit 4669215ca2
2 changed files with 31 additions and 3 deletions

View File

@@ -177,7 +177,7 @@ function renderComponentSubTree(
if (isFunction(comp)) {
renderVNode(push, renderComponentRoot(instance), instance)
} else {
if (!comp.ssrRender && !comp.render && isString(comp.template)) {
if (!instance.render && !comp.ssrRender && isString(comp.template)) {
comp.ssrRender = ssrCompile(comp.template, instance)
}
@@ -187,7 +187,7 @@ function renderComponentSubTree(
setCurrentRenderingInstance(instance)
comp.ssrRender(instance.proxy, push, instance)
setCurrentRenderingInstance(null)
} else if (comp.render) {
} else if (instance.render) {
renderVNode(push, renderComponentRoot(instance), instance)
} else {
throw new Error(