From 3159d3a9772eb03231cb56730997b627a44d0a81 Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Wed, 28 Aug 2024 15:47:59 +0700 Subject: fixing error goole merhanct --- src/pages/google_merchant/products/[page].js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pages/google_merchant/products/[page].js b/src/pages/google_merchant/products/[page].js index 6e0eb703..80017f93 100644 --- a/src/pages/google_merchant/products/[page].js +++ b/src/pages/google_merchant/products/[page].js @@ -50,7 +50,7 @@ export async function getServerSideProps({ res, query }) { let categoryId = null; if (brandId && brandId in brandsData) { - categoryId = brandsData[brandId].category_ids?.[0] ?? null; + categoryId = brandsData[brandId]?.category_ids?.[0] ?? null; } else { const solrBrand = await getBrandById(brandId); brandsData[brandId] = solrBrand; -- cgit v1.2.3