From 8f7e4842eb51231bab5b1c707617a2018a6003f5 Mon Sep 17 00:00:00 2001 From: edram Date: Sun, 23 Jun 2024 17:48:30 +0800 Subject: [PATCH] Only handle `unsupported BodyInit type` error --- source/core/constants.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/core/constants.ts b/source/core/constants.ts index 207ac613..f6a0c9c7 100644 --- a/source/core/constants.ts +++ b/source/core/constants.ts @@ -19,8 +19,13 @@ export const supportsRequestStreams = (() => { return 'half'; }, }).headers.has('Content-Type'); - } catch { + } catch (error) { // IOS QQBrowser throw "unsupported BodyInit type" Error (see issue #581) + if (error instanceof Error && error.message == "unsupported BodyInit type") { + return false; + } + + throw error; } }