Skip to content

Commit

Permalink
fixed patch filter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Nov 10, 2015
1 parent 8cea906 commit 4874957
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions compute.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function computeMatchData(match) {
**/
function computePlayerMatchData(player_match) {
computeMatchData(player_match);
console.log(player_match.patch);
player_match.player_win = (isRadiant(player_match) === player_match.radiant_win); //did the player win?
player_match.isRadiant = isRadiant(player_match);
player_match.total_gold = ~~(player_match.gold_per_min * player_match.duration / 60);
Expand Down
3 changes: 2 additions & 1 deletion views/query.jade
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ h2.inline-header
label Patch
select.form-control(multiple name="patch" placeholder="Any Patch")#patch
each entry, i in JSON.parse(JSON.stringify(constants.patch)).reverse()
option(value=i, selected=(q["patch"] && q["patch"][0]===i))=entry.name
- var revValue = (constants.patch.length - (i+1));
option(value=revValue, selected=(q["patch"] && q["patch"][0]===revValue))=entry.name
.form-group
label Game Mode
select.form-control(multiple name="game_mode" placeholder="Any Mode")#game_mode
Expand Down

0 comments on commit 4874957

Please sign in to comment.