Fix issue sorting screens with custom roles

This commit is contained in:
Andrew Kingston 2022-04-27 12:31:51 +01:00
parent 840ff254d1
commit 6480d62a1b
1 changed files with 2 additions and 2 deletions

View File

@ -28,8 +28,8 @@
.slice() .slice()
.sort((a, b) => { .sort((a, b) => {
// Sort by role first // Sort by role first
const roleA = RolePriorities[a.routing.roleId] const roleA = RolePriorities[a.routing.roleId] ?? 0
const roleB = RolePriorities[b.routing.roleId] const roleB = RolePriorities[b.routing.roleId] ?? 0
if (roleA !== roleB) { if (roleA !== roleB) {
return roleA > roleB ? -1 : 1 return roleA > roleB ? -1 : 1
} }