Merge pull request #1342 from whtsky/class-components-extends

Fix class component checks for extended components
This commit is contained in:
Sébastien Chopin 2017-08-13 23:37:53 +02:00 committed by GitHub
commit 15c1d4986a

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))