summaryrefslogtreecommitdiff
path: root/src/pages/google_merchant
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2024-09-09 10:01:12 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2024-09-09 10:01:12 +0700
commitafd84f86d2f26a3e0347dab7552060717030df19 (patch)
treed63d095e16a6dd052fb7d6858e78c1aac1115794 /src/pages/google_merchant
parentf8133c76306d9f70e01ac510c74dcfabe7f79b37 (diff)
parent495b327ba0a45b17f4f0156f846ebe8bddbcd075 (diff)
Merge branch 'release' into CR/product_detail
# Conflicts: # src-migrate/modules/product-detail/components/ProductDetail.tsx
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;