Skip to content

Commit 4eaf1b6

Browse files
committed
🧹 chore(elysia) update Elysia to 1.2
1 parent a4d0334 commit 4eaf1b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frameworks/TypeScript/elysia/src/postgres.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ export const findThenRand = (id: number) =>
2828
export const bulkUpdate = (worlds: World[]) =>
2929
sql`UPDATE world SET randomNumber = (update_data.randomNumber)::int
3030
FROM (VALUES ${worlds
31-
.sort((a, b) => (a.id < b.id ? -1 : 1))
31+
.sort((a, b) => {
32+
if (a.id < b.id) return -1;
33+
34+
return 1;
35+
})
3236
.map((world) => [
3337
world.id,
3438
world.randomNumber,

0 commit comments

Comments
 (0)