We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4d0334 commit 4eaf1b6Copy full SHA for 4eaf1b6
frameworks/TypeScript/elysia/src/postgres.ts
@@ -28,7 +28,11 @@ export const findThenRand = (id: number) =>
28
export const bulkUpdate = (worlds: World[]) =>
29
sql`UPDATE world SET randomNumber = (update_data.randomNumber)::int
30
FROM (VALUES ${worlds
31
- .sort((a, b) => (a.id < b.id ? -1 : 1))
+ .sort((a, b) => {
32
+ if (a.id < b.id) return -1;
33
+
34
+ return 1;
35
+ })
36
.map((world) => [
37
world.id,
38
world.randomNumber,
0 commit comments