Invert two code blocks (issue on green state of peer name)

This commit is contained in:
Pierre HUBERT 2020-04-12 18:07:26 +02:00
parent 95d2540cb4
commit 8493d56993

View File

@ -405,17 +405,16 @@ class CallWindow extends CustomEvents {
*/ */
async PeerReady(peerID) { async PeerReady(peerID) {
// Mark the peer as ready
const el = this.getMemberNameEl(peerID)
if(el)
el.classList.add("ready")
// Remove any previous connection // Remove any previous connection
if(this.peersEls.has(peerID)) { if(this.peersEls.has(peerID)) {
this.peersEls.get(peerID).destroy() 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({ const peer = new SimplePeer({
initiator: false, initiator: false,
trickle: true, // Allow exchange of multiple ice candidates trickle: true, // Allow exchange of multiple ice candidates