mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
fix!: don't await non-blocking strategies
This commit is contained in:
parent
8e18c1bdc0
commit
c07db7ee6f
@ -278,7 +278,7 @@ export function useAsyncData<
|
||||
|
||||
// Allow directly awaiting on asyncData
|
||||
const asyncDataPromise = Promise.resolve(nuxt._asyncDataPromises[key]).then(() => asyncData) as AsyncData<ResT, DataE>
|
||||
Object.assign(asyncDataPromise, asyncData)
|
||||
Object.assign(options.strategy === 'blocking' ? asyncDataPromise : Promise.resolve(asyncData), asyncData)
|
||||
|
||||
return asyncDataPromise as AsyncData<PickFrom<DataT, PickKeys>, DataE>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user