Skip to content

Commit

Permalink
Remove toParts portion of function, since it's not supported in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxStalker committed Aug 6, 2019
1 parent d8a5289 commit 0e51aa8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default class App extends Component {

// NOTE: This function is for _displaying_ a currency value to a user. It
// adds a currency unit to the beginning or end of the number!
currencyDisplay(amount, toParts=false, convert=true) {
currencyDisplay(amount, convert=true) {
const { account } = this.state;
const locale = getStoredValue('i18nextLng');
const symbol = getStoredValue('currency', account) || CONFIG.CURRENCY.DEFAULT_CURRENCY;
Expand All @@ -175,7 +175,8 @@ export default class App extends Component {
currency: symbol,
maximumFractionDigits: 2
});
return toParts ? formatter.formatToParts(amount) : formatter.format(amount);

return formatter.format(amount);
}

/*
Expand Down

0 comments on commit 0e51aa8

Please sign in to comment.