Merge pull request #637 from dod-ccpo/clin-nan-fix

Fix NaN appearing in CLIN fields
This commit is contained in:
leigh-mil 2019-02-13 13:23:57 -05:00 committed by GitHub
commit e5422b2486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,10 @@ export const formatDollars = (value, cents = true) => {
currency: 'USD', currency: 'USD',
}) })
} else if (typeof value === 'string') { } else if (typeof value === 'string') {
if (value === '') {
return value
}
return parseFloat(value).toLocaleString('us-US', { return parseFloat(value).toLocaleString('us-US', {
style: 'currency', style: 'currency',
currency: 'USD', currency: 'USD',