1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +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; const self = this;
if (this.opts.extraParams) { if (this.opts.extraParams) {
for (const key in this.opts.extraParams) { queryParams = {
if (!this.opts.extraParams.hasOwnProperty(key)) { ...queryParams,
continue; ...this.opts.extraParams,
} };
queryParams[key] = this.opts.extraParams[key];
}
} }
const headers = utils.extend({}, opts.headers || {}); const headers = utils.extend({}, opts.headers || {});