You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-10 21:23:02 +03:00
Use utils.keys rather than Object.keys for older browsers.
This commit is contained in:
@@ -80,7 +80,7 @@ module.exports.MatrixHttpApi.prototype = {
|
|||||||
if (resizeMethod) {
|
if (resizeMethod) {
|
||||||
params.method = resizeMethod;
|
params.method = resizeMethod;
|
||||||
}
|
}
|
||||||
if (Object.keys(params).length > 0) {
|
if (utils.keys(params).length > 0) {
|
||||||
// these are thumbnailing params so they probably want the
|
// these are thumbnailing params so they probably want the
|
||||||
// thumbnailing API...
|
// thumbnailing API...
|
||||||
prefix = "/_matrix/media/v1/thumbnail/";
|
prefix = "/_matrix/media/v1/thumbnail/";
|
||||||
@@ -93,7 +93,7 @@ module.exports.MatrixHttpApi.prototype = {
|
|||||||
serverAndMediaId = serverAndMediaId.substr(0, fragmentOffset);
|
serverAndMediaId = serverAndMediaId.substr(0, fragmentOffset);
|
||||||
}
|
}
|
||||||
return this.credentials.baseUrl + prefix + serverAndMediaId +
|
return this.credentials.baseUrl + prefix + serverAndMediaId +
|
||||||
(Object.keys(params).length === 0 ? "" :
|
(utils.keys(params).length === 0 ? "" :
|
||||||
("?" + utils.encodeParams(params))) + fragment;
|
("?" + utils.encodeParams(params))) + fragment;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ module.exports.MatrixHttpApi.prototype = {
|
|||||||
$ident: identiconString
|
$ident: identiconString
|
||||||
});
|
});
|
||||||
return this.credentials.baseUrl + path +
|
return this.credentials.baseUrl + path +
|
||||||
(Object.keys(params).length === 0 ? "" :
|
(utils.keys(params).length === 0 ? "" :
|
||||||
("?" + utils.encodeParams(params)));
|
("?" + utils.encodeParams(params)));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user