Remove unnecessary code

This commit is contained in:
RobinLinus 2019-02-18 22:19:07 +01:00 committed by GitHub
parent fb7c5cd642
commit cf9129618b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -274,11 +274,9 @@ class RTCPeer extends Peer {
if (message.sdp) { if (message.sdp) {
this._conn.setRemoteDescription(new RTCSessionDescription(message.sdp)) this._conn.setRemoteDescription(new RTCSessionDescription(message.sdp))
.then( _ => { .then( _ => {
if (message.sdp.type == 'offer') { if (message.sdp.type === 'offer') {
return this._conn.createAnswer() return this._conn.createAnswer()
.then(d => this._onDescription(d)); .then(d => this._onDescription(d));
} else {
return null;
} }
}) })
.catch(e => this._onError(e)); .catch(e => this._onError(e));