Merge pull request #1689 from gradido/no-plus-on-zero-decay

fix: No Plus Before Zero Decay
This commit is contained in:
Moriz Wahl 2022-03-30 19:52:20 +02:00 committed by GitHub
commit c9e609db6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,6 @@ const amount = (value) => {
const GDD = (value) => {
value = amount(value)
if (value === '') return ''
if (!value.match(/^ /)) value = '+ ' + value
if (!value.match(/^ /) && !value.match(/^0[.,]00$/)) value = '+ ' + value
return value + ' GDD'
}