commit cf9129618bfb77543da80cd36daa04e21951310b
parent fb7c5cd6423c4f5f222cb4e3fdb896a1cac4d62a
Author: RobinLinus <RobinLinus@users.noreply.github.com>
Date: Mon, 18 Feb 2019 22:19:07 +0100
Remove unnecessary code
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git 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
+}