cleanup
Some checks failed
Deploy Backend / deploy (push) Successful in 5m56s
Deploy Website / deploy (push) Has been cancelled

This commit is contained in:
Lee 2024-10-12 02:55:42 +01:00
parent afdbe0a3dc
commit 8f62c6c694

View File

@ -183,7 +183,6 @@ export async function getScoreSaberPlayerFromToken(
}, targetDate);
otherDate = formatDateMinimal(date);
}
if (!otherDate) {
return 0;
}
@ -196,7 +195,11 @@ export async function getScoreSaberPlayerFromToken(
const statToday = todayStats[`${statType}`];
const statOther = otherStats[`${statType}`];
return (!!(statToday && statOther) ? statToday - statOther : 0) * (statType == "pp" ? 1 : -1);
if (!statToday || !statOther) {
return 0;
}
return (statToday - statOther) * (statType == "pp" ? 1 : -1);
};
const getRankPosition = (rank: number): number => {