mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
fix refactor error in xhr, breaking it
This commit is contained in:
parent
e70f0d3e89
commit
b1cb797919
@ -68,7 +68,7 @@ export function xhrRequest(url, options) {
|
|||||||
const {status} = xhr;
|
const {status} = xhr;
|
||||||
let body = null;
|
let body = null;
|
||||||
if (xhr.getResponseHeader("Content-Type") === "application/json") {
|
if (xhr.getResponseHeader("Content-Type") === "application/json") {
|
||||||
body = JSON.parse(body);
|
body = JSON.parse(xhr.responseText);
|
||||||
}
|
}
|
||||||
return {status, body};
|
return {status, body};
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user