Skip to content

Commit

Permalink
fix: worker service (#280)
Browse files Browse the repository at this point in the history
* fix/worker-service: check if dbData exists

* fix/worker-service: check if dbData exists

* fix/worker-service: minor changes
  • Loading branch information
BEdev24 authored Aug 20, 2024
1 parent 3f4a667 commit b81ff07
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions worker-service/src/governance/services/vote.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,9 @@ export class VoteService extends CommonService {
addresses,
);
const results: VoteRequest[] = [];
if (dbData) {
dbData.forEach((vote) => {
results.push(VoteMapper.dbSyncToVoteRequest(vote, mapHotAddresses));
});
}
dbData.forEach((vote) => {
results.push(VoteMapper.dbSyncToVoteRequest(vote, mapHotAddresses));
});
return results;
}

Expand Down

0 comments on commit b81ff07

Please sign in to comment.