summaryrefslogtreecommitdiff
path: root/src/pages/google_merchant
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2024-08-29 14:53:38 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2024-08-29 14:53:38 +0700
commit38e9859f2d28af3b0c259eab620290254806d04c (patch)
treeb946c81b37727f0a22c038659a0f30846ca8055a /src/pages/google_merchant
parentaf6494b92528cee8fae7173e8290c4ebbc334efa (diff)
parentc6e970598c6c23f0606d1bc19036f0decd57cc05 (diff)
Merge branch 'release' into CR/search_enggine
Diffstat (limited to 'src/pages/google_merchant')
-rw-r--r--src/pages/google_merchant/products/[page].js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pages/google_merchant/products/[page].js b/src/pages/google_merchant/products/[page].js
index 6e0eb703..0c2cf3c5 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;
@@ -58,7 +58,7 @@ export async function getServerSideProps({ res, query }) {
}
if (categoryId && categoryId in categoriesData) {
- categoryName = categoriesData[categoryId].name_s ?? null;
+ categoryName = categoriesData[categoryId]?.name_s ?? null;
} else {
const solrCategory = await getCategoryById(categoryId);
categoriesData[categoryId] = solrCategory;