Skip to content

Commit

Permalink
Merge pull request #118 from hufs-sports-live/fix/query-string
Browse files Browse the repository at this point in the history
fix: value가 없을 땐 query string 넘기지 않도록 수정
  • Loading branch information
seongminn authored Nov 30, 2023
2 parents ed01c40 + 4040999 commit 3a56f30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/queryString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export const convertObjectToQueryString = (params: {
const queryString = new URLSearchParams();

Object.entries(params).forEach(([key, value]) => {
if (!value) return;

if (Array.isArray(value)) {
value.forEach(valueItem => {
queryString.append(toSnakeCase(key), valueItem || '');
Expand Down

0 comments on commit 3a56f30

Please sign in to comment.