#1775 Fix personas name sorting

This commit is contained in:
Cohee 2024-02-03 01:52:50 +02:00
parent 17a783f9c6
commit 37d94a4331

View File

@ -5416,7 +5416,11 @@ export async function getUserAvatars(doRender = true, openPageAt = '') {
}
const entities = personasFilter.applyFilters(allEntities);
entities.sort((a, b) => power_user.persona_sort_order === 'asc' ? a.localeCompare(b) : b.localeCompare(a));
entities.sort((a, b) => {
const aName = String(power_user.personas[a]);
const bName = String(power_user.personas[b]);
return power_user.persona_sort_order === 'asc' ? aName.localeCompare(bName) : bName.localeCompare(aName);
});
const storageKey = 'Personas_PerPage';
const listId = '#user_avatar_block';