@@ -1655,18 +1655,20 @@ function RTCIceCandidate(data) {
16551655 // Parse candidate SDP:
16561656 // Example: candidate:1829696681 1 udp 2122262783 2a01:cb05:8d3e:a300:e1ad:79c1:7096:8ba0 49778 typ host generation 0 ufrag c9L6 network-id 2 network-cost 10
16571657 var iceCandidateFields = candidateToJson ( this . candidate ) ;
1658- this . foundation = iceCandidateFields . foundation ;
1659- this . component = iceCandidateFields . componentId ;
1660- this . priority = iceCandidateFields . priority ;
1661- this . type = iceCandidateFields . candidateType ;
1662-
1663- this . address = iceCandidateFields . connectionAddress ;
1664- this . ip = iceCandidateFields . connectionAddress ;
1665- this . protocol = iceCandidateFields . transport ;
1666- this . port = iceCandidateFields . port ;
1667-
1668- this . relatedAddress = iceCandidateFields . remoteConnectionAddress || null ;
1669- this . relatedPort = iceCandidateFields . remotePort || null ;
1658+ if ( iceCandidateFields ) {
1659+ this . foundation = iceCandidateFields . foundation ;
1660+ this . component = iceCandidateFields . componentId ;
1661+ this . priority = iceCandidateFields . priority ;
1662+ this . type = iceCandidateFields . candidateType ;
1663+
1664+ this . address = iceCandidateFields . connectionAddress ;
1665+ this . ip = iceCandidateFields . connectionAddress ;
1666+ this . protocol = iceCandidateFields . transport ;
1667+ this . port = iceCandidateFields . port ;
1668+
1669+ this . relatedAddress = iceCandidateFields . remoteConnectionAddress || null ;
1670+ this . relatedPort = iceCandidateFields . remotePort || null ;
1671+ }
16701672}
16711673} , { } ] , 10 :[ function ( _dereq_ , module , exports ) {
16721674( function ( global ) {
0 commit comments