Skip to content

Commit af1a482

Browse files
committed
Case insensitive user sorting
1 parent 5c66426 commit af1a482

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/components/admin/user_utilities.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function sortUsers(users, currentAdminId, prioritizeSuperusers = true) {
2121
}
2222
}
2323
// then sort by email
24-
return a.email < b.email ? -1 : 1;
24+
return a.email.toLocaleLowerCase() < b.email.toLocaleLowerCase() ? -1 : 1;
2525
});
2626
return users;
2727
}
@@ -65,11 +65,11 @@ export const sortUserToImportSettings = function (users, desiredGroups, allGroup
6565
};
6666

6767
/**
68-
* @param {import('$lib/types').User[]} users
68+
* @param {import('fractal-components/types/api').User[]} users
6969
* @param {number} currentUserId
7070
*/
7171
export function sortDropdownUsers(users, currentUserId) {
72-
const usersCopy = /** @type {Array<import('$lib/types').User & {id: number}>} */ ([...users]);
72+
const usersCopy = /** @type {Array<import('fractal-components/types/api').User & {id: number}>} */ ([...users]);
7373
sortUsers(usersCopy, currentUserId, false);
7474
return usersCopy;
7575
}

0 commit comments

Comments
 (0)