You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-09 10:22:46 +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) {
|
||||
params.method = resizeMethod;
|
||||
}
|
||||
if (Object.keys(params).length > 0) {
|
||||
if (utils.keys(params).length > 0) {
|
||||
// these are thumbnailing params so they probably want the
|
||||
// thumbnailing API...
|
||||
prefix = "/_matrix/media/v1/thumbnail/";
|
||||
@@ -93,7 +93,7 @@ module.exports.MatrixHttpApi.prototype = {
|
||||
serverAndMediaId = serverAndMediaId.substr(0, fragmentOffset);
|
||||
}
|
||||
return this.credentials.baseUrl + prefix + serverAndMediaId +
|
||||
(Object.keys(params).length === 0 ? "" :
|
||||
(utils.keys(params).length === 0 ? "" :
|
||||
("?" + utils.encodeParams(params))) + fragment;
|
||||
},
|
||||
|
||||
@@ -119,7 +119,7 @@ module.exports.MatrixHttpApi.prototype = {
|
||||
$ident: identiconString
|
||||
});
|
||||
return this.credentials.baseUrl + path +
|
||||
(Object.keys(params).length === 0 ? "" :
|
||||
(utils.keys(params).length === 0 ? "" :
|
||||
("?" + utils.encodeParams(params)));
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user