Skip to content

Commit 31f1d49

Browse files
committed
Update functions.tsx
1 parent 9617b69 commit 31f1d49

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

refactor/src/utils/functions/functions.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ export const getFormattedCart = (data: IFormattedCartProps) => {
154154
const givenProduct = givenProducts[Number(i)].product.node;
155155

156156
// Convert price to a float value
157-
const convertedCurrency = givenProducts[Number(i)].total.replace(/[^0-9.-]+/g, '');
157+
const convertedCurrency = givenProducts[Number(i)].total.replace(
158+
/[^0-9.-]+/g,
159+
''
160+
);
158161

159162
product.productId = givenProduct.productId;
160163
product.cartKey = givenProducts[Number(i)].key;

0 commit comments

Comments
 (0)