web/elements: typing error when variables are not converted to string (#15169)

fix: typing error when variables are not converted to string

Co-authored-by: leandro.saraiva <leandro.saraiva@adonite.com>
This commit is contained in:
Leandro4002
2025-06-23 23:40:36 +02:00
committed by GitHub
parent 0b6ab171ce
commit 71be3acd1a

View File

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