From 98a9cc192609ee3c941e834c7b85bd5ab562c066 Mon Sep 17 00:00:00 2001 From: Rahul Kadyan Date: Thu, 14 Mar 2019 22:04:10 +0530 Subject: [PATCH] fix: Do not register component in render function Registering component in render function is throwing unknown component. In fact, there is no need to register component as `h` can accept async factory (async component) --- packages/@vuepress/core/lib/client/components/Content.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/@vuepress/core/lib/client/components/Content.js b/packages/@vuepress/core/lib/client/components/Content.js index 12d7096810..3acd9013f2 100644 --- a/packages/@vuepress/core/lib/client/components/Content.js +++ b/packages/@vuepress/core/lib/client/components/Content.js @@ -13,8 +13,7 @@ export default { const pageKey = this.pageKey || this.$parent.$page.key const pageComponent = getPageAsyncComponent(pageKey) if (pageComponent) { - Vue.component(pageKey, pageComponent) - return h(pageKey) + return h(pageComponent) } return h('') }