Skip to content

Commit

Permalink
fix: filter undefined values when creating the query url (#71)
Browse files Browse the repository at this point in the history
* fix: filter undefined values when creating the query url

* fix: early return
  • Loading branch information
connorlindsey authored May 7, 2024
1 parent 7b43cf7 commit 345be97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/common/fetchClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export default class FetchClient {
function appendParams(key: string, value: any, parentKey?: string) {
const fullKey = parentKey ? `${parentKey}[${key}]` : key;

// Skip undefined values
if (value === undefined) return;

if (
typeof value === "object" &&
value !== null &&
Expand Down

0 comments on commit 345be97

Please sign in to comment.