mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): handle undefined
when applying defaults for useAsyncData
issue appeared as a regression of #5660
This commit is contained in:
parent
00c1daebaf
commit
8d2f805770
@ -66,7 +66,9 @@ export function useAsyncData<
|
||||
}
|
||||
|
||||
// Apply defaults
|
||||
options = { server: true, default: getDefault, ...options }
|
||||
options.server = options.server ?? true
|
||||
options.default = options.default ?? getDefault
|
||||
|
||||
// TODO: remove support for `defer` in Nuxt 3 RC
|
||||
if ((options as any).defer) {
|
||||
console.warn('[useAsyncData] `defer` has been renamed to `lazy`. Support for `defer` will be removed in RC.')
|
||||
|
Loading…
Reference in New Issue
Block a user