diff --git a/modules/connectionquality/connectionquality.js b/modules/connectionquality/connectionquality.js index a2c5d61c5..390493703 100644 --- a/modules/connectionquality/connectionquality.js +++ b/modules/connectionquality/connectionquality.js @@ -99,7 +99,8 @@ export default { var newVal = 100 - data.packetLoss.total; var oldVal = remoteConnectionQuality[id]; - remoteConnectionQuality[id] = calculateQuality(newVal, oldVal); + remoteConnectionQuality[id] = calculateQuality(newVal, oldVal || 100); + console.debug(newVal, oldVal, remoteConnectionQuality[id]); eventEmitter.emit( CQEvents.REMOTESTATS_UPDATED, id, remoteConnectionQuality[id],