mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-09 05:16:23 +10:00
fix($core): check if layout exists (#1166)
This commit is contained in:
@@ -13,7 +13,10 @@ export default {
|
||||
computed: {
|
||||
layout () {
|
||||
if (this.$page.path) {
|
||||
return this.$page.frontmatter.layout || 'Layout'
|
||||
if (getLayoutAsyncComponent(this.$page.frontmatter.layout)) {
|
||||
return this.$page.frontmatter.layout
|
||||
}
|
||||
return 'Layout'
|
||||
}
|
||||
return 'NotFound'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user