Fix bug where an undefined last or first name for a dedication displays weird on the payment page

This commit is contained in:
Eric Schultz 2018-10-10 13:55:45 -05:00 committed by Eric Schultz
parent 976dede3eb
commit 6b23f21b56

View file

@ -166,7 +166,7 @@ function view(state) {
]) ])
, weekly , weekly
, dedic && (dedic.first_name || dedic.last_name) , dedic && (dedic.first_name || dedic.last_name)
? h('p.u-centered', `${dedic.dedication_type === 'memory' ? I18n.t('nonprofits.donate.dedication.in_memory_label') : I18n.t('nonprofits.donate.dedication.in_honor_label')} ` + `${dedic.first_name} ${dedic.last_name}`) ? h('p.u-centered', `${dedic.dedication_type === 'memory' ? I18n.t('nonprofits.donate.dedication.in_memory_label') : I18n.t('nonprofits.donate.dedication.in_honor_label')} ` + `${dedic.first_name || ''} ${dedic.last_name || ''}`)
: '' : ''
, paymentTabs(state) , paymentTabs(state)
]) ])