Moved handle party joined to array

This commit is contained in:
Mitchell McCaffrey 2020-11-21 16:01:37 +11:00
parent f028a011ca
commit 4fee6d278a

View File

@ -221,9 +221,10 @@ class Session extends EventEmitter {
} }
_handleJoinedParty(otherIds) { _handleJoinedParty(otherIds) {
for (let [index, id] of otherIds.entries()) { for (let i = 0; i < otherIds.length; i++) {
const id = otherIds[i];
// Send a sync request to the first member of the party // Send a sync request to the first member of the party
const sync = index === 0; const sync = i === 0;
this._addPeer(id, true, sync); this._addPeer(id, true, sync);
} }
this.emit("authenticationSuccess"); this.emit("authenticationSuccess");