Skip to content

Commit

Permalink
Merge pull request #83 from NextCafeteria/fix/crashing-on-integer-price
Browse files Browse the repository at this point in the history
Fix crashing for integer price
  • Loading branch information
vietanhdev committed Sep 6, 2023
2 parents 88e4983 + bbe4c4d commit dc543cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function uuidv4() {
}

export function formatPrice(price, prefix, suffix, decimal) {
let formatedPrice = price;
let formatedPrice = parseFloat(price);
if (decimal) {
formatedPrice = formatedPrice.toFixed(decimal);
} else {
Expand Down

0 comments on commit dc543cf

Please sign in to comment.