Skip to content

Commit

Permalink
fix: value가 없을 땐 query string 넘기지 않도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seongminn committed Nov 30, 2023
1 parent ed01c40 commit 4040999
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 4040999

Please sign in to comment.