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 Jan 14, 2022
1 parent 79e07a4 commit 426df1b
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 426df1b

Please sign in to comment.