File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1097,6 +1097,8 @@ Todos
10971097
10981098- [ ] make code editor plugin/package/extension that adds GraphQL syntax highlighting for ` useQuery` and ` useMutation` 😊
10991099
1100+ - [ ] add React Native test suite
1101+
11001102[1]: https://github.com/ava/use-http/issues/new?title=[Feature%20Request]%20YOUR_FEATURE_NAME
11011103[2]: https://github.com/ava/use-http/issues/93#issuecomment-600896722
11021104[3]: https://github.com/ava/use-http/raw/master/public/dog.png
Original file line number Diff line number Diff line change @@ -37,8 +37,10 @@ export default async function doFetchArgs<TData = any>(
3737 const url = `${ initialURL } ${ path } ${ route } `
3838
3939 const body = ( ( ) : BodyInit | null => {
40- if ( isBodyObject ( routeOrBody ) ) return JSON . stringify ( routeOrBody )
40+ // FormData instanceof check should go first, because React Native's FormData implementation
41+ // is indistinguishable from plain object when using isBodyObject check
4142 if ( routeOrBody instanceof FormData ) return routeOrBody
43+ if ( isBodyObject ( routeOrBody ) ) return JSON . stringify ( routeOrBody )
4244 if (
4345 ! isServer &&
4446 ( ( bodyAs2ndParam as any ) instanceof FormData ||
You can’t perform that action at this time.
0 commit comments