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