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:
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user