mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 23:27:55 -05:00
Leaderboard: Fix not showing current season by default
This commit is contained in:
@@ -104,8 +104,9 @@ export const loader = async ({ request }: LoaderArgs) => {
|
||||
LEADERBOARD_TYPES.find((type) => type === unvalidatedType) ??
|
||||
LEADERBOARD_TYPES[0];
|
||||
const season =
|
||||
allSeasons(new Date()).find((s) => s === Number(unvalidatedSeason)) ??
|
||||
currentOrPreviousSeason(new Date())!.nth;
|
||||
allSeasons(new Date()).find(
|
||||
(s) => unvalidatedSeason && s === Number(unvalidatedSeason),
|
||||
) ?? currentOrPreviousSeason(new Date())!.nth;
|
||||
|
||||
const userLeaderboard = type.includes("USER")
|
||||
? await cachified({
|
||||
|
||||
Reference in New Issue
Block a user