mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-05-22 04:14:41 +00:00
Remove unnecessary code
This commit is contained in:
@@ -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));
|
||||||
@@ -516,4 +514,4 @@ RTCPeer.config = {
|
|||||||
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
|
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
|
||||||
username: '28224511:1379330808'
|
username: '28224511:1379330808'
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user