You've already forked matrix-js-sdk
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:
@@ -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 || {});
|
||||||
|
|||||||
Reference in New Issue
Block a user