fix: fix profile being undefined on page reload

This commit is contained in:
Jonathan Rainville 2019-04-24 09:34:45 -04:00
parent 5b48ad3d58
commit dc9075eb71
No known key found for this signature in database
GPG Key ID: 5F4630B759727D9C
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ const createDelegate = (newDelegate, delegateInfo, pledge, profile, idx) => {
const delegateRecordExists = (profile, pledge, idx, existing) => { const delegateRecordExists = (profile, pledge, idx, existing) => {
const record = existing.find(delegate => { const record = existing.find(delegate => {
const { delegateIndex } = delegate const { delegateIndex } = delegate
if ( if (profile &&
profile.id === delegate.profile.id && profile.id === delegate.profile.id &&
pledge.idPledge === delegate.idPledge && pledge.idPledge === delegate.idPledge &&
idx === delegateIndex idx === delegateIndex