From 83f5a9ee11df7b3c0753055968a98329237fa608 Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Tue, 20 Nov 2018 13:32:09 +0800 Subject: [PATCH] Don't need to filter null dtlsTransport.iceTransport --- webrtc/RTCIceTransport.html | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/webrtc/RTCIceTransport.html b/webrtc/RTCIceTransport.html index 2dcb14a092fdd20..1a2f8f769591677 100644 --- a/webrtc/RTCIceTransport.html +++ b/webrtc/RTCIceTransport.html @@ -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'); @@ -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'); @@ -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');