init fix for #461

use `===` instead of `==`

don't format prices

increase price precision
This commit is contained in:
Baltazar Gomez 2017-08-09 21:19:41 -06:00 committed by Jeremy Kauffman
parent ce0dd5ae62
commit da497aeaf3

View file

@ -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 =