fix refactor error in xhr, breaking it

This commit is contained in:
Bruno Windels 2020-10-06 13:02:18 +02:00
parent e70f0d3e89
commit b1cb797919

View file

@ -68,7 +68,7 @@ export function xhrRequest(url, options) {
const {status} = xhr;
let body = null;
if (xhr.getResponseHeader("Content-Type") === "application/json") {
body = JSON.parse(body);
body = JSON.parse(xhr.responseText);
}
return {status, body};
});