Missed comment.

This commit is contained in:
mike12345567 2024-10-17 17:00:40 +01:00
parent 2ae1836b9a
commit bd10a3d831
1 changed files with 1 additions and 6 deletions

View File

@ -273,12 +273,7 @@ export async function roleToNumber(id: string) {
}
return 0
}
let highest = 0
for (let role of hierarchy) {
const roleNumber = findNumber(role)
highest = Math.max(roleNumber, highest)
}
return highest
return Math.max(...hierarchy.map(findNumber))
}
/**