mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-20 04:26:28 +08:00
parent
7bcc953504
commit
b953978ce5
1 changed files with 8 additions and 0 deletions
|
@ -378,6 +378,14 @@ async function requestNew(lb: LbKey, skip: number): Promise<void> {
|
|||
const response = await Ape.leaderboards.get("english", "time", lb, skip);
|
||||
const data: MonkeyTypes.LeaderboardEntry[] = response.data;
|
||||
|
||||
if (response.status === 503) {
|
||||
Notifications.add(
|
||||
"Leaderboards are currently updating - please try again later",
|
||||
-1
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
clearBody(lb);
|
||||
currentData[lb] = [];
|
||||
if (response.status !== 200 || data.length === 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue