Fix issue sorting screens with custom roles
This commit is contained in:
parent
840ff254d1
commit
6480d62a1b
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue