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

Style checks

This commit is contained in:
Kegan Dougal
2015-09-02 09:50:43 +01:00
parent 3b9f1728c7
commit 3c01e2db43

View File

@@ -394,17 +394,19 @@ module.exports.MatrixHttpApi.prototype = {
}
catch (ex) {
defer.reject(ex);
if (callback) callback(ex);
if (callback) {
callback(ex);
}
}
return defer.promise;
}
};
/**
/*
* Returns a callback that can be invoked by an HTTP request on completion,
* that will either resolve or reject the given defer as well as invoke the
* given userDefinedCallback (if any).
*
*
* If onlyData is true, the defer/callback is invoked with the body of the
* response, otherwise the result code.
*/