fix: usernames
This commit is contained in:
parent
ef772986cf
commit
913342c5f3
|
@ -26,8 +26,12 @@ export const fetchUsernames = createAsyncThunk(
|
|||
if (0 === missingIds.length) {
|
||||
return hasAnonymous ? [[0, 'anonymous']] : [];
|
||||
}
|
||||
return new Promise((resolve) => (
|
||||
socket.send(new Usernames(missingIds), (usernames) => {
|
||||
return new Promise((resolve, reject) => (
|
||||
socket.send(new Usernames(missingIds), (error, usernames) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
resolve(
|
||||
missingIds
|
||||
.map((id, i) => [id, usernames[i]])
|
||||
|
|
Loading…
Reference in New Issue
Block a user