Fix rank for unranked sessions on ladder histogram

This commit is contained in:
Michael Schmatz 2014-05-16 13:27:42 -07:00
parent 934c853789
commit bd1261802d

View file

@ -242,7 +242,8 @@ module.exports = class LadderTabView extends CocoView
if teamName.toLowerCase() is "humans" then rankClass = "rank-text humans-rank-text"
message = "#{histogramData.length} players"
if @leaderboards[teamName].session? then message="##{@leaderboards[teamName].myRank} of #{histogramData.length}"
if @leaderboards[teamName].session? and @leaderboards[teamName].myRank <= histogramData.length
message="##{@leaderboards[teamName].myRank} of #{histogramData.length}"
svg.append("g")
.append("text")
.attr("class",rankClass)