aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/database.ts2
-rw-r--r--src/hypixelCached.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/database.ts b/src/database.ts
index e195eed..6b57bc0 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -297,7 +297,7 @@ async function fetchMemberLeaderboardRaw(name: string): Promise<memberRawLeaderb
return cachedRawLeaderboards.get(name) as memberRawLeaderboardItem[]
// if it's currently being fetched, check every 100ms until it's in cachedRawLeaderboards
- if (fetchingRawLeaderboardNames.has(name)) {
+ if (fetchingRawLeaderboardNames.has(name) || !cachedRawLeaderboards.get(name)) {
while (true) {
await sleep(100)
if (cachedRawLeaderboards.has(name))
diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts
index b49a190..3130f41 100644
--- a/src/hypixelCached.ts
+++ b/src/hypixelCached.ts
@@ -263,7 +263,7 @@ async function fetchBasicProfiles(user: string): Promise<CleanBasicProfile[] | n
const player = await fetchPlayer(playerUuid)
if (!player) {
- console.log('bruh playerUuid', user, playerUuid)
+ // this happens when the player changed their name recently and the old name is cached on hypixel
return []
}
const profiles = player.profiles