Skip to content

Commit

Permalink
add default amount to avoid Nan
Browse files Browse the repository at this point in the history
  • Loading branch information
teneeto committed Dec 10, 2023
1 parent c34095e commit 2f78afd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/CurrencyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function convertToFrontendAmount(amountAsInt: number): number {
* @param currency - IOU currency
* @param shouldFallbackToTbd - whether to return 'TBD' instead of a falsy value (e.g. 0.00)
*/
function convertToDisplayString(amountInCents: number, currency: string = CONST.CURRENCY.USD, shouldFallbackToTbd = false): string {
function convertToDisplayString(amountInCents = 0, currency: string = CONST.CURRENCY.USD, shouldFallbackToTbd = false): string {
if (shouldFallbackToTbd && !amountInCents) {
return Localize.translateLocal('common.tbd');
}
Expand Down

0 comments on commit 2f78afd

Please sign in to comment.