Преглед изворни кода

fix(ie11): do not type check for RTCSessionDescription

Error handling was added to ensure some munging helpers
were receiving RTCSessionDescriptions. Temasys is doing
something else and is passing its own object into
the mungers. So, let temasys do that.
tags/v0.0.2
Leonard Kim пре 8 година
родитељ
комит
a05ebdbbbc
2 измењених фајлова са 4 додато и 5 уклоњено
  1. 2
    2
      modules/RTC/LocalSdpMunger.js
  2. 2
    3
      modules/RTC/TraceablePeerConnection.js

+ 2
- 2
modules/RTC/LocalSdpMunger.js Прегледај датотеку

@@ -170,8 +170,8 @@ export default class LocalSdpMunger {
170 170
      * @returns {RTCSessionDescription}
171 171
      */
172 172
     maybeAddMutedLocalVideoTracksToSDP(desc) {
173
-        if (!desc || !(desc instanceof RTCSessionDescription)) {
174
-            throw new Error('Incorrect type, expected RTCSessionDescription');
173
+        if (!desc) {
174
+            throw new Error('No local description passed in.');
175 175
         }
176 176
 
177 177
         const transformer = new SdpTransformWrap(desc.sdp);

+ 2
- 3
modules/RTC/TraceablePeerConnection.js Прегледај датотеку

@@ -1076,9 +1076,8 @@ const normalizePlanB = function(desc) {
1076 1076
  * @param {Object} localDescription the SDP object as defined by WebRTC.
1077 1077
  */
1078 1078
 const enforceSendRecv = function(localDescription) {
1079
-    if (!localDescription
1080
-        || !(localDescription instanceof RTCSessionDescription)) {
1081
-        throw new Error('Incorrect type, expected RTCSessionDescription');
1079
+    if (!localDescription) {
1080
+        throw new Error('No local description passed in.');
1082 1081
     }
1083 1082
 
1084 1083
     const transformer = new SdpTransformWrap(localDescription.sdp);

Loading…
Откажи
Сачувај