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

If there are extraParams set, ensure that queryParams is defined

This commit is contained in:
Will Hunt
2020-09-23 13:57:38 +01:00
parent 9d08744fe2
commit 5447d99481

View File

@@ -651,12 +651,10 @@ MatrixHttpApi.prototype = {
const self = this;
if (this.opts.extraParams) {
for (const key in this.opts.extraParams) {
if (!this.opts.extraParams.hasOwnProperty(key)) {
continue;
}
queryParams[key] = this.opts.extraParams[key];
}
queryParams = {
...queryParams,
...this.opts.extraParams,
};
}
const headers = utils.extend({}, opts.headers || {});