From b1cb7979197abff8b334c4f91535a76530ebc814 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 6 Oct 2020 13:02:18 +0200 Subject: [PATCH] fix refactor error in xhr, breaking it --- src/matrix/net/request/xhr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}; });