Resolve Promise when got VueComponent

This commit is contained in:
dojineko 2017-08-06 02:29:44 +09:00
parent b2edab0517
commit 43f7a39415

View File

@ -42,7 +42,7 @@ export default {
loadLayout (layout) {
if (!layout || !layouts['_' + layout]) layout = 'default'
let _layout = '_' + layout
if (typeof layouts[_layout] !== 'function') {
if (typeof layouts[_layout] !== 'function' || layouts[_layout].name === 'VueComponent') {
return Promise.resolve(layouts[_layout])
}
return layouts[_layout]()