From 0923a67c938e53ab30063b1e5bb8574bc8f9406d Mon Sep 17 00:00:00 2001 From: matc-pub <161147791+matc-pub@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:04:19 +0200 Subject: [PATCH] Allow falsey get parameter values (#257) --- src/http.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http.ts b/src/http.ts index 7445a38..e51e2a2 100644 --- a/src/http.ts +++ b/src/http.ts @@ -1547,7 +1547,7 @@ export class LemmyHttp { function encodeGetParams(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("&"); }