summaryrefslogtreecommitdiff
path: root/src-migrate
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate')
-rw-r--r--src-migrate/modules/product-detail/components/Information.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src-migrate/modules/product-detail/components/Information.tsx b/src-migrate/modules/product-detail/components/Information.tsx
index 590e8afd..3c2eb537 100644
--- a/src-migrate/modules/product-detail/components/Information.tsx
+++ b/src-migrate/modules/product-detail/components/Information.tsx
@@ -66,7 +66,7 @@ const Information = ({ product }: Props) => {
}, [selectedVariant]);
const handleOnChange = (vals: any) => {
- let code = vals.split(' ')[0];
+ let code = vals.replace(/\s-\s.*$/, '').trim();
let variant = variantOptions.find((item) => item.code === code);
setSelectedVariant(variant);
setInputValue(