client/users: fix presenting user rank
This commit is contained in:
parent
df5d72d429
commit
524cbd0680
1 changed files with 2 additions and 3 deletions
|
@ -219,15 +219,14 @@ class UsersController {
|
||||||
|
|
||||||
const myRankIdx = api.user ? api.allRanks.indexOf(api.user.rank) : 0;
|
const myRankIdx = api.user ? api.allRanks.indexOf(api.user.rank) : 0;
|
||||||
let ranks = {};
|
let ranks = {};
|
||||||
for (let rankIdx of misc.range(api.allRanks.length)) {
|
for (let [rankIdx, rankIdentifier] of api.allRanks.entries()) {
|
||||||
const rankIdentifier = api.allRanks[rankIdx];
|
|
||||||
if (rankIdentifier === 'anonymous') {
|
if (rankIdentifier === 'anonymous') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (rankIdx > myRankIdx) {
|
if (rankIdx > myRankIdx) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ranks[rankIdentifier] = rankNames.values()[rankIdx];
|
ranks[rankIdentifier] = rankNames.get(rankIdentifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLoggedIn) {
|
if (isLoggedIn) {
|
||||||
|
|
Loading…
Reference in a new issue