Fix missing rank data on partial tracked days
This commit is contained in:
parent
7f5587546c
commit
118dc9d9f1
@ -143,9 +143,10 @@ export async function getScoreSaberPlayerFromToken(
|
|||||||
daysAgo += 1;
|
daysAgo += 1;
|
||||||
|
|
||||||
const dateKey = formatDateMinimal(date);
|
const dateKey = formatDateMinimal(date);
|
||||||
if (!statisticHistory[dateKey]) {
|
if (!statisticHistory[dateKey] || statisticHistory[dateKey].rank == undefined) {
|
||||||
missingDays += 1;
|
missingDays += 1;
|
||||||
statisticHistory[dateKey] = {
|
statisticHistory[dateKey] = {
|
||||||
|
...statisticHistory[dateKey],
|
||||||
rank: rank,
|
rank: rank,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user