fix(vue-app): properly catch component loading error (#5687) (#5688)

This commit is contained in:
Rafał Chłodnicki 2019-05-10 10:50:50 +02:00 committed by Pooya Parsa
parent 2a66d1952e
commit be18b31525
1 changed files with 1 additions and 4 deletions

View File

@ -85,10 +85,7 @@ export default {
const Components = this.getPrefetchComponents()
for (const Component of Components) {
try {
Component()
Component.__prefetched = true
} catch (e) {}
Component().then(() => Component.__prefetched = true).catch(() => {})
}<% if (router.linkPrefetchedClass) { %>
this.addPrefetchedClass()<% } %>
}<% if (router.linkPrefetchedClass) { %>,