1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-04 05:02:41 +03:00

null check

This commit is contained in:
David Baker
2015-09-16 21:27:21 +01:00
parent f665748fe5
commit ac7457f532

View File

@@ -156,7 +156,11 @@ MatrixCall.prototype._initWithInvite = function(event) {
// firefox and OpenWebRTC's RTCPeerConnection doesn't add streams until it
// starts getting media on them so we need to figure out whether a video
// channel has been offered by ourselves.
if (this.msg.offer.sdp.indexOf('m=video') > -1) {
if (
this.msg.offer &&
this.msg.offer.sdp &&
this.msg.offer.sdp.indexOf('m=video') > -1
) {
this.type = 'video';
}
else {