You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Handle undefined call stats
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -427,6 +427,13 @@ export default class CallHandler {
|
|||||||
`our Party ID: ${call.ourPartyId}, hangup party: ${call.hangupParty}, ` +
|
`our Party ID: ${call.ourPartyId}, hangup party: ${call.hangupParty}, ` +
|
||||||
`hangup reason: ${call.hangupReason}`,
|
`hangup reason: ${call.hangupReason}`,
|
||||||
);
|
);
|
||||||
|
if (!stats) {
|
||||||
|
logger.debug(
|
||||||
|
"Call statistics are undefined. The call has " +
|
||||||
|
"probably failed before a peerConn was established",
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
logger.debug("Local candidates:");
|
logger.debug("Local candidates:");
|
||||||
for (const cand of stats.filter(item => item.type === 'local-candidate')) {
|
for (const cand of stats.filter(item => item.type === 'local-candidate')) {
|
||||||
const address = cand.address || cand.ip; // firefox uses 'address', chrome uses 'ip'
|
const address = cand.address || cand.ip; // firefox uses 'address', chrome uses 'ip'
|
||||||
|
|||||||
Reference in New Issue
Block a user