File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " use-http" ,
3
- "version" : " 0.2.6 " ,
3
+ "version" : " 0.2.7 " ,
4
4
"homepage" : " http://use-http.com" ,
5
5
"main" : " dist/index.js" ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
11
11
UseFetchArgs ,
12
12
CachePolicies ,
13
13
} from './types'
14
- import { BodyOnly , FetchData , NoArgs } from './types'
14
+ import { FetchData , NoArgs } from './types'
15
15
import useFetchArgs from './useFetchArgs'
16
16
import doFetchArgs from './doFetchArgs'
17
17
import { isEmpty , invariant } from './utils'
@@ -177,13 +177,8 @@ function useFetch<TData = any>(...args: UseFetchArgs): UseFetch<TData> {
177
177
if ( dependencies && Array . isArray ( dependencies ) ) {
178
178
const methodName = requestInit . method || HTTPMethod . GET
179
179
const methodLower = methodName . toLowerCase ( ) as keyof ReqMethods
180
- if ( methodName !== HTTPMethod . GET ) {
181
- const req = request [ methodLower ] as BodyOnly
182
- req ( requestInit . body as BodyInit )
183
- } else {
184
- const req = request [ methodLower ] as NoArgs
185
- req ( )
186
- }
180
+ const req = request [ methodLower ] as NoArgs
181
+ req ( )
187
182
}
188
183
} , dependencies )
189
184
You can’t perform that action at this time.
0 commit comments