mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-04 11:27:13 +00:00
Resolve Promise when got VueComponent
This commit is contained in:
parent
b2edab0517
commit
43f7a39415
@ -42,7 +42,7 @@ export default {
|
|||||||
loadLayout (layout) {
|
loadLayout (layout) {
|
||||||
if (!layout || !layouts['_' + layout]) layout = 'default'
|
if (!layout || !layouts['_' + layout]) layout = 'default'
|
||||||
let _layout = '_' + layout
|
let _layout = '_' + layout
|
||||||
if (typeof layouts[_layout] !== 'function') {
|
if (typeof layouts[_layout] !== 'function' || layouts[_layout].name === 'VueComponent') {
|
||||||
return Promise.resolve(layouts[_layout])
|
return Promise.resolve(layouts[_layout])
|
||||||
}
|
}
|
||||||
return layouts[_layout]()
|
return layouts[_layout]()
|
||||||
|
Loading…
Reference in New Issue
Block a user