From 9d96fadf6e08ec74b2e262b69f2d9bbec5fa7e22 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 3 Jan 2023 20:44:28 -0500 Subject: [PATCH] In encode get params, dont serialize the undefineds. --- src/http.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/http.ts b/src/http.ts index 9127be4..f93231f 100644 --- a/src/http.ts +++ b/src/http.ts @@ -1184,6 +1184,7 @@ export class LemmyHttp { function encodeGetParams(p: BodyType): string { return Object.entries(p) + .filter(kv => !!kv[1]) .map(kv => kv.map(encodeURIComponent).join("=")) .join("&"); }