In encode get params, dont serialize the undefineds.

This commit is contained in:
Dessalines 2023-01-03 20:44:28 -05:00
parent 8ece7c134e
commit 9d96fadf6e

View file

@ -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("&");
}