Skip to content

Commit

Permalink
backport fix from #112
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Feb 19, 2020
1 parent b0328f0 commit be0e6cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/response.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function response (request, headers) {
status: request.status,
url: request.responseURL,
text: () => Promise.resolve(request.responseText),
json: () => Promise.resolve(JSON.parse(request.responseText)),
json: () => Promise.resolve(request.responseText).then(JSON.parse),
blob: () => Promise.resolve(new Blob([request.response])),
clone: () => response(request, headers),
headers: {
Expand Down

0 comments on commit be0e6cd

Please sign in to comment.