Skip to content

Commit

Permalink
tools: fix small not-quite-a-bug in find-inactive-tsc.mjs
Browse files Browse the repository at this point in the history
The current code attempts to count votes from people who were not
members at the start of the 3 month period, resulting in `NaN` being
tallied for their votes.

PR-URL: nodejs#41469
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
  • Loading branch information
Trott authored and thedull committed Jan 18, 2022
1 parent 458da04 commit fe7b53b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/find-inactive-tsc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ async function getVotingRecords(tscMembers, votes) {
await fs.promises.readFile(path.join('.tmp', vote), 'utf8')
);
for (const member in voteData.votes) {
votingRecords[member]++;
if (tscMembers.includes(member)) {
votingRecords[member]++;
}
}
}
return votingRecords;
Expand Down

0 comments on commit fe7b53b

Please sign in to comment.