mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-30 00:01:14 +00:00
In encode get params, dont serialize the undefineds.
This commit is contained in:
parent
8ece7c134e
commit
9d96fadf6e
1 changed files with 1 additions and 0 deletions
|
@ -1184,6 +1184,7 @@ export class LemmyHttp {
|
|||
|
||||
function encodeGetParams<BodyType extends object>(p: BodyType): string {
|
||||
return Object.entries(p)
|
||||
.filter(kv => !!kv[1])
|
||||
.map(kv => kv.map(encodeURIComponent).join("="))
|
||||
.join("&");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue