web/elements: fix dual select without sortBy (#14977)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L.
2025-06-09 19:04:07 +02:00
committed by GitHub
parent f4da22aea8
commit a844fb41d4
2 changed files with 3 additions and 3 deletions

View File

@ -32,8 +32,8 @@ import {
} from "./types.js";
function localeComparator(a: DualSelectPair, b: DualSelectPair) {
const aSortBy = a[2];
const bSortBy = b[2];
const aSortBy = a[2] || a[0];
const bSortBy = b[2] || a[0];
return aSortBy.localeCompare(bSortBy);
}