Skip to content

Commit

Permalink
chore: fix panic in type governance data
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Letang <me@jeremyletang.com>
  • Loading branch information
jeremyletang committed Apr 24, 2024
1 parent 897c906 commit 2454552
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/types/snapshot_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2279,7 +2279,9 @@ func (g GovernanceEnacted) IntoProto() *snapshot.GovernanceEnacted {
Proposals: make([]*snapshot.ProposalData, 0, len(g.Proposals)),
}
for _, p := range g.Proposals {
ret.Proposals = append(ret.Proposals, p.IntoProto())
if p != nil && p.Proposal != nil {
ret.Proposals = append(ret.Proposals, p.IntoProto())
}
}
return &ret
}
Expand Down

0 comments on commit 2454552

Please sign in to comment.