mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 17:37:14 +00:00
fix: use allSettled
for promises
This commit is contained in:
parent
c07db7ee6f
commit
55e6f5d4a4
@ -62,7 +62,8 @@ export const RouteProvider = defineComponent({
|
||||
const ResolvePendingPromises = defineComponent({
|
||||
async setup () {
|
||||
const nuxtApp = useNuxtApp()
|
||||
await Promise.all(Object.values(nuxtApp._asyncDataPromises).filter(p => p?.strategy !== 'lazy'))
|
||||
const promises = Object.values(nuxtApp._asyncDataPromises).filter(p => p?.strategy !== 'lazy')
|
||||
await (Promise.allSettled?.(promises) ?? Promise.all(promises).catch(() => {}))
|
||||
},
|
||||
render: () => null
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user