Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 542de27

Browse files
author
Mohammadreza Ghorbani
committed
Refactor usage in the function itself
1 parent b1f8804 commit 542de27

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/javascript/_common/base/currency_base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const formatMoney = (currency_value, amount, exclude_currency, decimals = 0, min
2828
return sign + (exclude_currency ? money : money + formatCurrency(currency_value));
2929
};
3030

31-
const formatCurrency = currency => `<span class="symbols">&nbsp;${getCurrencyDisplayCode(currency)}</span>`; // defined in binary-style
31+
const formatCurrency = currency => currency ? `<span class="symbols">&nbsp;${getCurrencyDisplayCode(currency)}</span>` : ''; // defined in binary-style
3232

3333
const addComma = (num, decimal_points, is_crypto) => {
3434
let number = String(num || 0).replace(/,/g, '');

src/javascript/app/pages/user/account/settings/self_exclusion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const SelfExclusion = (() => {
5252

5353
currency = Client.get('currency');
5454

55-
$('.append_currency').after(currency ? Currency.formatCurrency(currency) : '');
55+
$('.append_currency').after(Currency.formatCurrency(currency));
5656

5757
// svg is only applicable for CR clients
5858
is_svg_client = Client.get('landing_company_shortcode') === 'svg';

0 commit comments

Comments
 (0)