Skip to content

Commit

Permalink
fix($core): check if layout exists (#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy authored and ulivz committed Jan 8, 2019
1 parent a6f3699 commit 38d1dea
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down

0 comments on commit 38d1dea

Please sign in to comment.