Skip to content

Commit

Permalink
fix(client): fix terms expression rendering (#130)
Browse files Browse the repository at this point in the history
* fix(client): fix terms expression rendering

* chore: added changeset

---------

Co-authored-by: Sjors <[email protected]>
  • Loading branch information
petevdp and microwavekonijn authored Apr 29, 2024
1 parent 48bd527 commit 0832632
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nasty-buttons-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ps2census": patch
---

fix(client): fix terms expression rendering
2 changes: 1 addition & 1 deletion src/rest/get.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class GetQuery<C extends CollectionNames, R = Format<C>> {
// A term with a list of values is added multiple times due to the fact that Census is weird.
if (join.terms)
str += `^terms:${Object.entries(join.terms)
.map((k, v) =>
.map(([k, v]) =>
Array.isArray(v)
? v.map(sv => `${k}=${sv}`).join('`')
: `${k}=${v}`,
Expand Down

0 comments on commit 0832632

Please sign in to comment.