mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
This commit is contained in:
parent
f391e5d331
commit
5d5a32b556
@ -85,7 +85,10 @@ export default {
|
||||
const Components = this.getPrefetchComponents()
|
||||
|
||||
for (const Component of Components) {
|
||||
Component().catch(() => {})
|
||||
const componentOrPromise = Component()
|
||||
if (componentOrPromise instanceof Promise) {
|
||||
componentOrPromise.catch(() => {})
|
||||
}
|
||||
Component.__prefetched = true
|
||||
}<% if (router.linkPrefetchedClass) { %>
|
||||
this.addPrefetchedClass()<% } %>
|
||||
|
Loading…
Reference in New Issue
Block a user