From 4fee6d278a15348c155dd723bac64fb2ae08f152 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sat, 21 Nov 2020 16:01:37 +1100 Subject: [PATCH] Moved handle party joined to array --- src/network/Session.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/network/Session.js b/src/network/Session.js index f1a02d4..0ffb7a3 100644 --- a/src/network/Session.js +++ b/src/network/Session.js @@ -221,9 +221,10 @@ class Session extends EventEmitter { } _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 - const sync = index === 0; + const sync = i === 0; this._addPeer(id, true, sync); } this.emit("authenticationSuccess");