Skip to content

Commit e44314d

Browse files
committed
Throw an exception when the element is undefined
1 parent 35e818b commit e44314d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/modules/qbWebRTC.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ WebRTCProxy.prototype.attachMediaStream = function(id, stream, options) {
297297
elem.style.transform = 'scaleX(-1)';
298298
}
299299
elem.play();
300+
} else {
301+
throw new Error('Unable to attach media stream, element ' + elemId + ' is undefined');
300302
}
301303
};
302304

0 commit comments

Comments
 (0)