Skip to content

Commit

Permalink
fix($core): cannot render another page with pageKey (close: #1173)
Browse files Browse the repository at this point in the history
Error: Unknown Custom Element - <v-#####>
  • Loading branch information
ulivz committed Mar 9, 2019
1 parent e5f51de commit 9d01514
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/@vuepress/core/lib/client/components/Content.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { isPageExists } from '../util'
import Vue from 'vue'
import { isPageExists, getPageAsyncComponent } from '../util'

export default {
props: {
Expand All @@ -11,6 +12,7 @@ export default {
render (h) {
const pageKey = this.pageKey || this.$parent.$page.key
if (isPageExists(pageKey)) {
Vue.component(pageKey, getPageAsyncComponent(pageKey))
return h(pageKey)
}
return h('')
Expand Down

0 comments on commit 9d01514

Please sign in to comment.