init fix for #461
use `===` instead of `==` don't format prices increase price precision
This commit is contained in:
parent
ce0dd5ae62
commit
da497aeaf3
1 changed files with 3 additions and 2 deletions
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue