You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
JSON is JSON
This commit is contained in:
@@ -431,7 +431,7 @@ module.exports.MatrixHttpApi.prototype = {
|
|||||||
// option as we do with the home server, but it does return JSON, so
|
// option as we do with the home server, but it does return JSON, so
|
||||||
// parse it manually
|
// parse it manually
|
||||||
return defer.promise.then(function(response) {
|
return defer.promise.then(function(response) {
|
||||||
return JSON.parse(response);
|
return typeof(response) === 'string' ? JSON.parse(response) : response;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user