Skip to content

Commit

Permalink
Allow falsey get parameter values (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
matc-pub authored Apr 15, 2024
1 parent b577dee commit 0923a67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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("&");
}
Expand Down

0 comments on commit 0923a67

Please sign in to comment.