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 }