This commit is contained in:
Dragon Fire
2021-02-01 22:04:07 -05:00
parent 2a6f9e46f0
commit cd653cc999
+2 -2
View File
@@ -44,13 +44,13 @@ module.exports = class LastRunLeaderboardCommand extends Command {
return commands
.sort((a, b) => a.lastRun ? b.lastRun - a.lastRun : 1)
.map(command => {
if (previousPts === command.lastRun.toISOString()) {
if (previousPts === command.lastRun || previousPts === command.lastRun.toISOString()) {
positionsMoved++;
} else {
i += positionsMoved;
positionsMoved = 1;
}
previousPts = command.lastRun.toISOString();
previousPts = command.lastRun ? command.lastRun.toISOString() : null;
const displayTime = command.lastRun ? moment.utc(command.lastRun).format('MM/DD/YYYY h:mm A') : null;
return `**${i}.** ${command.name} (${displayTime || 'Never'})`;
})