null doesn't set queryParams to {} here, so revert explicitly

This commit is contained in:
Bruno Windels 2020-04-22 20:47:53 +02:00
parent 174fd3ea4a
commit f826258c75

View File

@ -43,8 +43,8 @@ export class HomeServerApi {
return `${this._homeserver}/_matrix/client/r0${csPath}`;
}
_request(method, url, queryParams = {}, body, options) {
const queryString = Object.entries(queryParams)
_request(method, url, queryParams, body, options) {
const queryString = Object.entries(queryParams || {})
.filter(([, value]) => value !== undefined)
.map(([name, value]) => {
if (typeof value === "object") {