From ba518b57b07e880c349eca5e9f0ba7ed0d829c66 Mon Sep 17 00:00:00 2001 From: Martin Kuba Date: Wed, 29 Mar 2023 17:04:48 -0700 Subject: [PATCH 1/2] correctly evaluate logical expression --- src/frontend/components/CartItems/CartItems.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/components/CartItems/CartItems.tsx b/src/frontend/components/CartItems/CartItems.tsx index 095ae4d7e5..bef722fb53 100644 --- a/src/frontend/components/CartItems/CartItems.tsx +++ b/src/frontend/components/CartItems/CartItems.tsx @@ -50,7 +50,7 @@ const CartItems = ({ productList, shouldShowPrice = true }: IProps) => { const unitSum = productList.reduce((acc, { product: { priceUsd: { units = 0 } = {} } }) => acc + Number(units), 0) + - shippingConst?.units || 0 + nanoExceed; + (shippingConst?.units || 0) + nanoExceed; return { units: unitSum, From 767a4c03aeff6c2fd69133d3571fb8ae7ade27f3 Mon Sep 17 00:00:00 2001 From: Martin Kuba Date: Wed, 29 Mar 2023 17:14:19 -0700 Subject: [PATCH 2/2] updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fe681f53c..3f35a9f9eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ release. ([#805](https://github.com/open-telemetry/opentelemetry-demo/pull/805)) * Fix http.status_code on error in frontend ([#810](https://github.com/open-telemetry/opentelemetry-demo/pull/810)) +* Fix bug in shipping calculation + ([#814](https://github.com/open-telemetry/opentelemetry-demo/pull/814)) ## v0.1.0