Skip to content

Commit 2a71452

Browse files
committed
perf: enhance sort by oj order
1 parent c7cf3e0 commit 2a71452

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function getContests(config?: config): Promise<{ running: contest[]
3939
cfg.abbrList.map(
4040
async abbr =>
4141
{
42-
try { return await alloj[abbr].get(); }
42+
try { return (await alloj[abbr].get()).sort((a, b) => a.startTime.getTime() - b.startTime.getTime()); }
4343
catch(e)
4444
{
4545
console.error(`Failed to get contest information for ${alloj[abbr].name}, details:`);

0 commit comments

Comments
 (0)