mirror of
https://github.com/tooot-app/app
synced 2024-12-24 16:41:31 +01:00
Another fix #597
This commit is contained in:
parent
b36863337e
commit
a0bfb6cb24
@ -44,7 +44,10 @@ const apiGeneral = async <T = unknown>({
|
|||||||
...userAgent,
|
...userAgent,
|
||||||
...headers
|
...headers
|
||||||
},
|
},
|
||||||
...((body as (FormData & { _parts: [][] }) | undefined)?._parts.length && { data: body })
|
...(body &&
|
||||||
|
(body instanceof FormData
|
||||||
|
? (body as (FormData & { _parts: [][] }) | undefined)?._parts?.length
|
||||||
|
: Object.keys(body).length) && { data: body })
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
let links: {
|
let links: {
|
||||||
|
@ -47,7 +47,10 @@ const apiTooot = async <T = unknown>({
|
|||||||
...userAgent,
|
...userAgent,
|
||||||
...headers
|
...headers
|
||||||
},
|
},
|
||||||
...((body as (FormData & { _parts: [][] }) | undefined)?._parts.length && { data: body })
|
...(body &&
|
||||||
|
(body instanceof FormData
|
||||||
|
? (body as (FormData & { _parts: [][] }) | undefined)?._parts?.length
|
||||||
|
: Object.keys(body).length) && { data: body })
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
|
Loading…
Reference in New Issue
Block a user