summaryrefslogtreecommitdiff
path: root/src/pages/google_merchant
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-09-20 16:52:16 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-09-20 16:52:16 +0700
commita784f4623448ff846dbc5c8259405e6cce8fffb7 (patch)
tree016da331ea5a18ef2c3c1264728b1199b5e9172a /src/pages/google_merchant
parent1db54e16f970b4e09df89d432efd5a66ac775eb6 (diff)
parentb7e7696d675d0c2e36364f7cbedb0483a343048d (diff)
Merge branch 'release' into Feature/new-register
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;