Skip to content

Commit

Permalink
Fix to shipping calculation (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkuba authored Mar 30, 2023
1 parent 954d35a commit a155ea3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/frontend/components/CartItems/CartItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a155ea3

Please sign in to comment.