diff --git a/src/json.js b/src/json.js index 758141d..4b64afd 100644 --- a/src/json.js +++ b/src/json.js @@ -1,5 +1,8 @@ function responseJson(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); + if (response.status === 204 || response.status === 205) { + return null; + } return response.json(); }