~edwargix/tallyard

f6ac62bbced80e111ebef9b83e61a6a6f4e7b0ca — David Florness 4 years ago cf6b24c
Only fix Election.Joins on unmarshal if localvoter exists
1 files changed, 3 insertions(+), 1 deletions(-)

M election/election.go
M election/election.go => election/election.go +3 -1
@@ 47,6 47,8 @@ func (el *Election) UnmarshalJSON(b []byte) error {
		return err
	}
	// ensure these are the same pointer
	el.Joins[el.LocalVoter.JoinEvt.ID] = el.LocalVoter.Voter
	if el.LocalVoter != nil {
		el.Joins[el.LocalVoter.JoinEvt.ID] = el.LocalVoter.Voter
	}
	return nil
}