This commit is contained in:
Dragon Fire
2024-04-04 16:49:05 -04:00
parent 665cc4b98f
commit 299f6a8928
+1 -1
View File
@@ -50,7 +50,7 @@ module.exports = class UsElectionCommand extends Command {
else name = 'Other';
const score = tables.eq(i).children().eq(1).children().first().text().trim();
const percentChange = Number.parseFloat(tables.eq(i).children().eq(1).children().eq(1).text().trim() || 0);
canidates.push({ name, score, percentChange: `${percentChange > 0 ? '+' : ''}${percentChange}%` });
canidates.push({ name, score, percentChange: `${percentChange > -1 ? '+' : ''}${percentChange}%` });
}
return canidates;
}