Skip to content

Commit

Permalink
Update fetchBaseQuery.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunDychko authored May 15, 2022
1 parent 5f304bb commit 2e295bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/toolkit/src/query/fetchBaseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ const defaultValidateStatus = (response: Response) =>

const isJsonContentType = (headers: Headers) => {
const contentType = headers.get('content-type')?.trim();
return contentType?.startsWith('application/json') || contentType?.startsWith('application/vnd.api+json');
return (
contentType?.startsWith('application/json') ||
contentType?.startsWith('application/vnd.api+json')
);
}

const handleResponse = async (
Expand Down

0 comments on commit 2e295bb

Please sign in to comment.