Closed emp74ark closed 1 year ago
It was my mistake: when user was removed, its name can't be defined. Quick fix:
function defineName(userId: string) {
const user = users.all.filter((user) => user.id === userId);
if (user.length !== 0) {
return user[0].login;
}
return 'unknown'; // TODO: replace by variable with translation
}