fix: log sharing in app + clearing (#5801)
* fix: log wiping app * fix: share modal rounded
This commit is contained in:
@@ -60,10 +60,18 @@ export class TauriModrinthClient extends XHRUploadClient {
|
||||
|
||||
let body: BodyInit | null | undefined = undefined
|
||||
if (options.body) {
|
||||
if (typeof options.body === 'object' && !(options.body instanceof FormData)) {
|
||||
body = JSON.stringify(options.body)
|
||||
const raw = options.body
|
||||
if (
|
||||
typeof raw === 'object' &&
|
||||
!(raw instanceof FormData) &&
|
||||
!(raw instanceof URLSearchParams) &&
|
||||
!(raw instanceof Blob) &&
|
||||
!(raw instanceof ArrayBuffer) &&
|
||||
!ArrayBuffer.isView(raw as ArrayBufferView)
|
||||
) {
|
||||
body = JSON.stringify(raw)
|
||||
} else {
|
||||
body = options.body as BodyInit
|
||||
body = raw as BodyInit
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user