From 8493d569934652d69e981d2150d46ff820a39638 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 12 Apr 2020 18:07:26 +0200 Subject: [PATCH] Invert two code blocks (issue on green state of peer name) --- assets/js/components/calls/window.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index fbea8384..aa85917c 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -405,17 +405,16 @@ class CallWindow extends CustomEvents { */ async PeerReady(peerID) { - // Mark the peer as ready - const el = this.getMemberNameEl(peerID) - if(el) - el.classList.add("ready") - - // Remove any previous connection if(this.peersEls.has(peerID)) { this.peersEls.get(peerID).destroy() } + // Mark the peer as ready + const el = this.getMemberNameEl(peerID) + if(el) + el.classList.add("ready") + const peer = new SimplePeer({ initiator: false, trickle: true, // Allow exchange of multiple ice candidates