From da497aeaf398114f449781bd418df8279f7ba703 Mon Sep 17 00:00:00 2001 From: Baltazar Gomez Date: Wed, 9 Aug 2017 21:19:41 -0600 Subject: [PATCH] init fix for #461 use `===` instead of `==` don't format prices increase price precision --- ui/js/component/common.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/js/component/common.js b/ui/js/component/common.js index 8e7279248..61980a15b 100644 --- a/ui/js/component/common.js +++ b/ui/js/component/common.js @@ -72,7 +72,7 @@ export class CreditAmount extends React.PureComponent { }; static defaultProps = { - precision: 1, + precision: 3, label: true, showFree: false, look: "indicator", @@ -83,8 +83,9 @@ export class CreditAmount extends React.PureComponent { this.props.amount, this.props.precision ); + let amountText; - if (this.props.showFree && parseFloat(formattedAmount) == 0) { + if (this.props.showFree && parseFloat(formattedAmount) === 0) { amountText = __("free"); } else if (this.props.label) { amountText =