1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-13 19:42:25 +03:00

Unbreak tests

This commit is contained in:
Kegan Dougal
2016-01-21 17:34:12 +00:00
parent 197144dcda
commit 7bdab05785
4 changed files with 20 additions and 7 deletions

View File

@@ -43,6 +43,9 @@ module.exports.PREFIX_V2_ALPHA = "/_matrix/client/v2_alpha";
*/
module.exports.PREFIX_IDENTITY_V1 = "/_matrix/identity/api/v1";
/**
* A constant representing the URI path for release 0 of the Client-Server HTTP API.
*/
module.exports.PREFIX_R0 = "/_matrix/client/r0";
/**
@@ -443,9 +446,11 @@ module.exports.MatrixHttpApi.prototype = {
handlerFn(err, response, body);
}
);
// FIXME: This is EVIL, but I can't think of a better way to expose
// abort() operations on underlying HTTP requests :(
reqPromise.abort = req.abort.bind(req);
if (req && req.abort) {
// FIXME: This is EVIL, but I can't think of a better way to expose
// abort() operations on underlying HTTP requests :(
reqPromise.abort = req.abort.bind(req);
}
}
catch (ex) {
defer.reject(ex);