Skip to content

Commit

Permalink
Only handle unsupported BodyInit type error
Browse files Browse the repository at this point in the history
  • Loading branch information
edram committed Jun 23, 2024
1 parent 06ca9ca commit d4b7537
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ export const supportsRequestStreams = (() => {
return 'half';
},
}).headers.has('Content-Type');
} catch {
} catch (err) {

Check failure on line 22 in source/core/constants.ts

View workflow job for this annotation

GitHub Actions / Node.js 18

The catch parameter `err` should be named `error`.

Check failure on line 22 in source/core/constants.ts

View workflow job for this annotation

GitHub Actions / Node.js 18

The variable `err` should be named `error`. A more descriptive name will do too.
// IOS QQBrowser throw "unsupported BodyInit type" Error (see issue #581)
if (err instanceof Error && err.message == "unsupported BodyInit type") {

Check failure on line 24 in source/core/constants.ts

View workflow job for this annotation

GitHub Actions / Node.js 18

Expected '===' and instead saw '=='.

Check failure on line 24 in source/core/constants.ts

View workflow job for this annotation

GitHub Actions / Node.js 18

Strings must use singlequote.
return false;
}

throw err;
}
}

Expand Down

0 comments on commit d4b7537

Please sign in to comment.