From a16174e2a11b93f0e2853d41fb87c27c2e9fef69 Mon Sep 17 00:00:00 2001 From: tom Date: Mon, 12 Jun 2023 13:38:32 -0400 Subject: [PATCH] fix api fetch query falsy params --- lib/api/buildUrl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/buildUrl.ts b/lib/api/buildUrl.ts index bee6f8faaa..137652efd4 100644 --- a/lib/api/buildUrl.ts +++ b/lib/api/buildUrl.ts @@ -18,8 +18,8 @@ export default function buildUrl( const url = new URL(compile(path)(pathParams), baseUrl); queryParams && Object.entries(queryParams).forEach(([ key, value ]) => { - // there are some pagination params that can be null for the next page - (value || value === null) && url.searchParams.append(key, String(value)); + // there are some pagination params that can be null or false for the next page + value !== undefined && value !== '' && url.searchParams.append(key, String(value)); }); return url.toString();