From cf9129618bfb77543da80cd36daa04e21951310b Mon Sep 17 00:00:00 2001 From: RobinLinus Date: Mon, 18 Feb 2019 22:19:07 +0100 Subject: [PATCH] Remove unnecessary code --- client/scripts/network.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/scripts/network.js b/client/scripts/network.js index d47e952..8c1ddcb 100644 --- a/client/scripts/network.js +++ b/client/scripts/network.js @@ -274,11 +274,9 @@ class RTCPeer extends Peer { if (message.sdp) { this._conn.setRemoteDescription(new RTCSessionDescription(message.sdp)) .then( _ => { - if (message.sdp.type == 'offer') { + if (message.sdp.type === 'offer') { return this._conn.createAnswer() .then(d => this._onDescription(d)); - } else { - return null; } }) .catch(e => this._onError(e)); @@ -516,4 +514,4 @@ RTCPeer.config = { credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=', username: '28224511:1379330808' }] -} \ No newline at end of file +}