summaryrefslogtreecommitdiff
path: root/src-migrate/modules
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-10-25 16:19:56 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-10-25 16:19:56 +0700
commitfdd6902a19ee050d97937252ef70bafa8fbe44d9 (patch)
tree8706123576ce0008e92c0a8c5c84275d37ecf7c4 /src-migrate/modules
parentc64472c479ec282af9b606a76358922b25752be0 (diff)
<iman> update code
Diffstat (limited to 'src-migrate/modules')
-rw-r--r--src-migrate/modules/product-detail/components/Information.tsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/src-migrate/modules/product-detail/components/Information.tsx b/src-migrate/modules/product-detail/components/Information.tsx
index 8655517d..b3311cb5 100644
--- a/src-migrate/modules/product-detail/components/Information.tsx
+++ b/src-migrate/modules/product-detail/components/Information.tsx
@@ -56,13 +56,15 @@ const Information = ({ product }: Props) => {
};
useEffect(() => {
- getsla();
- setInputValue(
- selectedVariant?.code +
- (selectedVariant?.attributes[0]
- ? ' - ' + selectedVariant?.attributes[0]
- : '')
- );
+ if (selectedVariant) {
+ getsla();
+ setInputValue(
+ selectedVariant?.code +
+ (selectedVariant?.attributes[0]
+ ? ' - ' + selectedVariant?.attributes[0]
+ : '')
+ );
+ }
}, [selectedVariant]);
const handleOnChange = (vals: any) => {