diff --git a/src/matrix/net/request/xhr.js b/src/matrix/net/request/xhr.js index 6685131e..ad4a33fc 100644 --- a/src/matrix/net/request/xhr.js +++ b/src/matrix/net/request/xhr.js @@ -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}; });