Skip to content

Commit

Permalink
correction to team stat pick rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
ebshimizu committed Feb 26, 2018
1 parent 855e8d7 commit b294e47
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions js/teams.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,17 @@ function loadTeamData(team, matches, heroData) {
context.ban2Percent = (context.value.ban2Percent * 100).toFixed(2) + '%';

$('#team-ban-summary tbody').append(teamBanSummaryRowTemplate(context));
}

for (let h in teamStats.heroes) {
let hero = teamStats.heroes[h];
if (hero.games === 0)
continue;

// picks
// uhhhh yeah ok let's use the same context
let context = {};
context.value = {};
context.heroName = h;
context.heroImg = Heroes.heroIcon(h);
context.value.picks = hero.picks;
context.value.winPercent = hero.wins / hero.games;
context.winPercent = (context.value.winPercent * 100).toFixed(2) + '%';
Expand Down

0 comments on commit b294e47

Please sign in to comment.