cleanup
This commit is contained in:
parent
afdbe0a3dc
commit
8f62c6c694
@ -183,7 +183,6 @@ export async function getScoreSaberPlayerFromToken(
|
|||||||
}, targetDate);
|
}, targetDate);
|
||||||
otherDate = formatDateMinimal(date);
|
otherDate = formatDateMinimal(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!otherDate) {
|
if (!otherDate) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -196,7 +195,11 @@ export async function getScoreSaberPlayerFromToken(
|
|||||||
|
|
||||||
const statToday = todayStats[`${statType}`];
|
const statToday = todayStats[`${statType}`];
|
||||||
const statOther = otherStats[`${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 => {
|
const getRankPosition = (rank: number): number => {
|
||||||
|
Reference in New Issue
Block a user