From e5ce3c9eecc1059de98d7e48f6a99774e5a43795 Mon Sep 17 00:00:00 2001 From: Parminder Klair Date: Tue, 18 Jun 2019 14:30:42 +0530 Subject: [PATCH] Wrong calculation for product items #178 --- src/pages/Dashboard/components/ProductItem.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/Dashboard/components/ProductItem.js b/src/pages/Dashboard/components/ProductItem.js index 1ec2bbf..9687fec 100644 --- a/src/pages/Dashboard/components/ProductItem.js +++ b/src/pages/Dashboard/components/ProductItem.js @@ -46,6 +46,9 @@ class ProductItem extends React.Component { const { price } = this.state; const { product, currency } = this.props; + if (!product.priceCurrency) { + return this.setState({ price }); + } if ( product.priceCurrency.length === 0 || product.priceCurrency === currency