Clarify some users.length
that were forgotten in a previous PR
This commit is contained in:
parent
252dca3d3f
commit
234fd31411
@ -41,7 +41,7 @@ ClientManager.prototype.autoloadUsers = function() {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!users.length) {
|
if (users.length === 0) {
|
||||||
log.info(noUsersWarning);
|
log.info(noUsersWarning);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ ClientManager.prototype.autoloadUsers = function() {
|
|||||||
const loaded = this.clients.map((c) => c.name);
|
const loaded = this.clients.map((c) => c.name);
|
||||||
const updatedUsers = this.getUsers();
|
const updatedUsers = this.getUsers();
|
||||||
|
|
||||||
if (!updatedUsers.length) {
|
if (updatedUsers.length === 0) {
|
||||||
log.info(noUsersWarning);
|
log.info(noUsersWarning);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,12 +28,12 @@ program
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!users.length) {
|
if (users.length > 0) {
|
||||||
log.info(`There are currently no users. Create one with ${colors.bold("lounge add <name>")}.`);
|
|
||||||
} else {
|
|
||||||
log.info("Users:");
|
log.info("Users:");
|
||||||
for (var i = 0; i < users.length; i++) {
|
users.forEach((user, i) => {
|
||||||
log.info(`${i + 1}. ${colors.bold(users[i])}`);
|
log.info(`${i + 1}. ${colors.bold(user)}`);
|
||||||
}
|
});
|
||||||
|
} else {
|
||||||
|
log.info(`There are currently no users. Create one with ${colors.bold("lounge add <name>")}.`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user