From f52c7dc642f25ebbd00a35475cba6b35ca76e515 Mon Sep 17 00:00:00 2001 From: Mitch Stark Date: Mon, 26 Jul 2021 08:32:13 -0400 Subject: [PATCH] convert category to number before checking for int --- 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))