fix(nuxt): respect immediate option in useFetch (#7720)

This commit is contained in:
Daniel Roe 2022-09-22 14:55:29 +01:00 committed by GitHub
parent b68cf0706d
commit 2894a75bc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,7 @@ export function useFetch<
pick, pick,
watch, watch,
initialCache, initialCache,
immediate,
...fetchOptions ...fetchOptions
} = opts } = opts
@ -78,6 +79,7 @@ export function useFetch<
transform, transform,
pick, pick,
initialCache, initialCache,
immediate,
watch: [ watch: [
_request, _request,
...(watch || []) ...(watch || [])