Skip to content

Commit

Permalink
fix(useFetch): 'Response': body stream already read (vueuse#3607)
Browse files Browse the repository at this point in the history
  • Loading branch information
mymx2 committed Dec 3, 2023
1 parent dd00d92 commit 4cf1d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useFetch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ export function useFetch<T>(url: MaybeRefOrGetter<string>, ...args: any[]): UseF
response.value = fetchResponse
statusCode.value = fetchResponse.status

responseData = await fetchResponse[config.type]()
responseData = await fetchResponse.clone()[config.type]()

// see: https://www.tjvantoll.com/2015/09/13/fetch-and-errors/
if (!fetchResponse.ok) {
Expand Down

0 comments on commit 4cf1d9a

Please sign in to comment.