remove this log
All checks were successful
Deploy Backend / deploy (push) Successful in 4m39s
Deploy Website / deploy (push) Successful in 9m13s

This commit is contained in:
Lee 2024-10-13 05:27:27 +01:00
parent 4d27fe9bae
commit 67c1775edb

@ -107,10 +107,6 @@ export async function getScoreSaberPlayerFromToken(
`${apiUrl}/player/history/${token.id}${playerIdCookie && playerIdCookie == token.id ? "?createIfMissing=true" : ""}` `${apiUrl}/player/history/${token.id}${playerIdCookie && playerIdCookie == token.id ? "?createIfMissing=true" : ""}`
) )
.json(); .json();
if (history === undefined || Object.entries(history).length === 0) {
console.log("Player has no history, using fallback");
throw new Error();
}
if (history) { if (history) {
// Use the latest data for today // Use the latest data for today
history[todayDate] = { history[todayDate] = {
@ -125,9 +121,7 @@ export async function getScoreSaberPlayerFromToken(
isBeingTracked = true; isBeingTracked = true;
} }
statisticHistory = history; statisticHistory = history;
} catch (e) { } catch (e) {}
console.log("Player has no history, using fallback");
}
const playerRankHistory = token.histories.split(",").map(value => { const playerRankHistory = token.histories.split(",").map(value => {
return parseInt(value); return parseInt(value);