From 40409994de7de7f28422de4060aa94476d086a73 Mon Sep 17 00:00:00 2001 From: seongminn Date: Thu, 30 Nov 2023 16:15:13 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20value=EA=B0=80=20=EC=97=86=EC=9D=84=20?= =?UTF-8?q?=EB=95=90=20query=20string=20=EB=84=98=EA=B8=B0=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/queryString.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/queryString.ts b/src/utils/queryString.ts index 851d73f..dd91fa0 100644 --- a/src/utils/queryString.ts +++ b/src/utils/queryString.ts @@ -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 || '');