Skip to content

Commit

Permalink
return empty slice if not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
skylenet committed Jul 10, 2024
1 parent 3df5e31 commit c049ea3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions indexer/consensus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ func (client *ConsensusClient) GetLastClientError() string {
}

func (client *ConsensusClient) GetNodePeers() []*v1.Peer {
if client.peers == nil {
return []*v1.Peer{}
}
return client.peers
}

Expand Down

0 comments on commit c049ea3

Please sign in to comment.