Ensure stable sort when no lang is specified

This commit is contained in:
Zoe Roux
2025-06-23 01:49:10 +02:00
parent 985a13c1e4
commit 26410734fc
2 changed files with 8 additions and 4 deletions
+2
View File
@@ -271,6 +271,8 @@ export async function getShows({
.orderBy(
showTranslations.pk,
sql`array_position(${sqlarr(languages)}, ${showTranslations.language})`,
// ensure a stable sort to prevent future pages to contains the same element again
showTranslations.language,
)
.as("t");