Skip to content

Commit

Permalink
feat: #49 (*) fix price helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem committed Aug 22, 2021
1 parent 9a9b46a commit 036a964
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/composables/src/helpers/_utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const createPrice = (price: number): number => {
return price / 100;
return price ? price / 100 : 0;
};
4 changes: 1 addition & 3 deletions packages/theme/helpers/shipping-billing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,5 @@ export const mapOrderAddressToAddressForm = (orderAddress: OrderAddress): Addres
};

export const getCalculatedPrice = (price: number): number => {
if (!price) return;

return price / 100;
return price ? price / 100 : 0;
};

0 comments on commit 036a964

Please sign in to comment.