From 177914186e610512058380c855eeff1daac5f717 Mon Sep 17 00:00:00 2001 From: MitchStarkTekton <61703668+MitchStarkTekton@users.noreply.github.com> Date: Wed, 28 Jul 2021 20:30:55 -0400 Subject: [PATCH] convert category to number before checking for int (#422) --- framework/bigcommerce/product/use-search.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/bigcommerce/product/use-search.tsx b/framework/bigcommerce/product/use-search.tsx index bea01753b..cd6c34612 100644 --- a/framework/bigcommerce/product/use-search.tsx +++ b/framework/bigcommerce/product/use-search.tsx @@ -22,7 +22,7 @@ export const handler: SWRHook = { const url = new URL(options.url!, 'http://a') if (search) url.searchParams.set('search', search) - if (Number.isInteger(categoryId)) + if (Number.isInteger(Number(categoryId))) url.searchParams.set('categoryId', String(categoryId)) if (Number.isInteger(brandId)) url.searchParams.set('brandId', String(brandId))