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

Commit 643fc51

Browse files
mamali-fsMohammadreza Ghorbani
andauthored
mamali/Hide currency when no currency is set (#6586)
* Hide currency when no currency is set * Refactor usage in the function itself Co-authored-by: Mohammadreza Ghorbani <reza@firstsource.email>
1 parent 5ae2b9a commit 643fc51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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, '');

0 commit comments

Comments
 (0)