From a181665f20207db5617d794df8159483fef0c2a8 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Mon, 22 Jul 2024 11:16:47 +0700
Subject: no message

---
 src/lib/product/components/ProductCard.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/lib/product/components/ProductCard.jsx')

diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index 818dbbcf..3b5fab28 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -18,7 +18,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
 
   let voucherPastiHemat = 0;
 
-  if (product?.voucherPastiHemat.length > 0) {
+  if (product?.voucherPastiHemat?.length > 0) {
     const stringVoucher = product?.voucherPastiHemat[0];
     const validJsonString = stringVoucher.replace(/'/g, '"');
     voucherPastiHemat = JSON.parse(validJsonString);
-- 
cgit v1.2.3

