mirror of
https://github.com/tooot-app/app
synced 2024-12-23 16:20:08 +01:00
Another fix #597
This commit is contained in:
parent
b36863337e
commit
a0bfb6cb24
@ -44,7 +44,10 @@ const apiGeneral = async <T = unknown>({
|
||||
...userAgent,
|
||||
...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 => {
|
||||
let links: {
|
||||
|
@ -47,7 +47,10 @@ const apiTooot = async <T = unknown>({
|
||||
...userAgent,
|
||||
...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 => {
|
||||
return Promise.resolve({
|
||||
|
Loading…
Reference in New Issue
Block a user