Fix class component checks for extended components

This commit is contained in:
Wu Haotian 2017-08-11 17:36:05 +08:00
parent 127155d61a
commit 221bb8800f
No known key found for this signature in database
GPG Key ID: 9A146A3AA793AACB

View File

@ -79,7 +79,7 @@ export default async context => {
let Components = []
try {
Components = await Promise.all(getMatchedComponents(router.match(context.url)).map(Component => {
if (typeof Component !== 'function' || Component.super === Vue) {
if (typeof Component !== 'function' || Component.cid) {
return sanitizeComponent(Component)
}
return Component().then(Component => sanitizeComponent(Component))