Skip to content

Commit

Permalink
Merge pull request #23 from engagepeople/fix/835-formatCurrency_with_…
Browse files Browse the repository at this point in the history
…0_value

Making sure to show 0 amounts
  • Loading branch information
snapjay authored Sep 11, 2018
2 parents c3a4489 + 55d5a2e commit 3d7f317
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ export default class Utils {
}

public formatCurrency(
amount: number | null,
amount: number | undefined,
showLabel: boolean = true,
currency: ICurrency = this.getCurrency()): string {

const result = []
if (amount) {
if (typeof amount === 'number') {
result.push(NumberFormat(amount, currency.precision))
}
if (showLabel) {
Expand Down

0 comments on commit 3d7f317

Please sign in to comment.