From 09ed8b1e2371bce75bd7525004a884523f560570 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Mon, 3 Nov 2014 10:37:08 +0100 Subject: [PATCH] Fix issue where incoming chat messages fail when getting called from the same session at the same time (FS#1922). --- static/js/directives/chat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/directives/chat.js b/static/js/directives/chat.js index 6699f844..1b35c6ec 100644 --- a/static/js/directives/chat.js +++ b/static/js/directives/chat.js @@ -238,7 +238,7 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'], subscope.sendChat = function(to, message, status, mid, noloop) { //console.log("send chat", to, scope.peer); var peercall = mediaStream.webrtc.findTargetCall(to); - if (peercall && peercall.peerconnection.datachannelReady) { + if (peercall && peercall.peerconnection && peercall.peerconnection.datachannelReady) { subscope.p2p(true); // Send out stuff through data channel. return subscope.sendChatPeer2Peer(peercall, to, message, status, mid, noloop);