Skip to content

Commit

Permalink
Don't need to filter null dtlsTransport.iceTransport
Browse files Browse the repository at this point in the history
  • Loading branch information
soareschen committed Nov 20, 2018
1 parent 1d0a0f3 commit 83f5a9e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions webrtc/RTCIceTransport.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@
pc2.sctp.transport
]
.filter(dtlsTransport => dtlsTransport) // filter null/undefined
.map(dtlsTransport => dtlsTransport.iceTransport)
.filter(iceTransport => iceTransport); // filter null/undefined
.map(dtlsTransport => dtlsTransport.iceTransport);

assert_greater_than(iceTransports.length, 2, 'expect to find at least 2 RTCIceTransports');

Expand Down Expand Up @@ -128,8 +127,7 @@
]
.map(senderReceiver => senderReceiver.transport)
.filter(dtlsTransport => dtlsTransport) // filter null/undefined
.map(dtlsTransport => dtlsTransport.iceTransport)
.filter(iceTransport => iceTransport); // filter null/undefined
.map(dtlsTransport => dtlsTransport.iceTransport);

assert_greater_than(iceTransports.length, 2, 'expect to find at least 2 RTCIceTransports');

Expand Down Expand Up @@ -158,8 +156,7 @@
]
.map(senderReceiver => senderReceiver.transport)
.filter(dtlsTransport => dtlsTransport) // filter null/undefined
.map(dtlsTransport => dtlsTransport.iceTransport)
.filter(iceTransport => iceTransport); // filter null/undefined
.map(dtlsTransport => dtlsTransport.iceTransport);

assert_greater_than(iceTransports.length, 1, 'expect to find at least 1 RTCIceTransports');

Expand Down

0 comments on commit 83f5a9e

Please sign in to comment.