docs: fix defaults in custom fetch example (#20898)

This commit is contained in:
Vasily Kuzin 2023-05-17 01:06:28 +03:00 committed by GitHub
parent 53bd8a44ec
commit 83cb5d6f54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@ export function useCustomFetch<T> (url: string, options: UseFetchOptions<T> = {}
}
// for nice deep defaults, please use unjs/defu
const params = defu(defaults, options)
const params = defu(options, defaults)
return useFetch(url, params)
}