Skip to content

Commit

Permalink
WarpySyncer: set roles to empty array if nil
Browse files Browse the repository at this point in the history
  • Loading branch information
asiaziola committed May 15, 2024
1 parent 4878480 commit 3d1f124
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/warpy_sync/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ func (self *Writer) sendInteractionChunk(interactions *[]InteractionPayload) (er
members := make([]Member, 0, len(*interactions))
for _, p := range *interactions {
roles, ok := (*addressToRoles)[p.FromAddress]
if roles == nil {
roles = make([]string, 0)
}
if ok {
members = append(members, Member{Id: p.FromAddress, Roles: roles, Points: p.Points})
} else {
Expand Down

0 comments on commit 3d1f124

Please sign in to comment.