mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-02 18:37:21 +00:00
Fix class component typeerror when using nuxt1.0.0-alpha
This commit is contained in:
parent
b2ef8c320f
commit
e4e0711de2
@ -52,7 +52,7 @@ export default async (context) => {
|
|||||||
let Components = []
|
let Components = []
|
||||||
let promises = getMatchedComponents(router.match(context.url)).map((Component) => {
|
let promises = getMatchedComponents(router.match(context.url)).map((Component) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (typeof Component !== 'function') return resolve(sanitizeComponent(Component))
|
if (typeof Component !== 'function' || Component.super === Vue) return resolve(sanitizeComponent(Component))
|
||||||
const _resolve = (Component) => resolve(sanitizeComponent(Component))
|
const _resolve = (Component) => resolve(sanitizeComponent(Component))
|
||||||
Component().then(_resolve).catch(reject)
|
Component().then(_resolve).catch(reject)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user