1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-23 17:02:25 +03:00

Throw an exception if trying to do an ID server request with no ID server

Will help with https://github.com/vector-im/riot-web/issues/10540
This commit is contained in:
David Baker
2019-08-12 15:39:50 +01:00
parent 17724fc8d3
commit 39c1de19fc

View File

@@ -389,6 +389,10 @@ module.exports.MatrixHttpApi.prototype = {
prefix,
accessToken,
) {
if (!this.opts.idBaseUrl) {
throw new Error("No ID Server Base URL set");
}
const fullUri = this.opts.idBaseUrl + prefix + path;
if (callback !== undefined && !utils.isFunction(callback)) {