Skip to content

Commit d8d3fb9

Browse files
chore(internal): codegen related update (#143)
1 parent b2391f8 commit d8d3fb9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
7+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
88
brew bundle check >/dev/null 2>&1 || {
99
echo "==> Installing Homebrew dependencies…"
1010
brew bundle

src/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
4848
}
4949

5050
const contentType = response.headers.get('content-type');
51-
const isJSON =
52-
contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
51+
const mediaType = contentType?.split(';')[0]?.trim();
52+
const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
5353
if (isJSON) {
5454
const json = await response.json();
5555

0 commit comments

Comments
 (0)