Skip to content

Commit

Permalink
fix: error when response body is empty (status 205)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsapro committed Dec 22, 2023
1 parent 4e75d4b commit 9a68fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Api {

_checkResponse(res: Response) {
if (res.ok) {
if (res.status === 204) return res;
if (res.status === 204 || res.status === 205) return res;
return res.json();
}

Expand Down

0 comments on commit 9a68fb9

Please sign in to comment.