mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-01 01:59:55 +00:00
Allow falsey get parameter values (#257)
This commit is contained in:
parent
b577deee2f
commit
0923a67c93
1 changed files with 1 additions and 1 deletions
|
@ -1547,7 +1547,7 @@ export class LemmyHttp {
|
|||
|
||||
function encodeGetParams<BodyType extends object>(p: BodyType): string {
|
||||
return Object.entries(p)
|
||||
.filter(kv => !!kv[1])
|
||||
.filter(kv => kv[1] !== undefined && kv[1] !== null)
|
||||
.map(kv => kv.map(encodeURIComponent).join("="))
|
||||
.join("&");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue