Fix setting minscore - initialized to 0 (#1725)
Signed-off-by: shishir gowda <shishir@livekit.io>
This commit is contained in:
@@ -159,7 +159,9 @@ func coalesce(stats []*livekit.AnalyticsStat) *livekit.AnalyticsStat {
|
|||||||
|
|
||||||
// only consider non-zero scores
|
// only consider non-zero scores
|
||||||
if stat.Score > 0 {
|
if stat.Score > 0 {
|
||||||
if stat.Score < minScore {
|
if minScore == 0 {
|
||||||
|
minScore = stat.Score
|
||||||
|
} else if stat.Score < minScore {
|
||||||
minScore = stat.Score
|
minScore = stat.Score
|
||||||
}
|
}
|
||||||
scoreSum += stat.Score
|
scoreSum += stat.Score
|
||||||
|
|||||||
Reference in New Issue
Block a user