From 487495758876dcacf4ad962e0806eff6fb2aa79b Mon Sep 17 00:00:00 2001 From: Bitnami Date: Mon, 9 Nov 2015 21:55:35 -0500 Subject: [PATCH] fixed patch filter issue --- compute.js | 1 + views/query.jade | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compute.js b/compute.js index 9da3b5173..63e24de62 100644 --- a/compute.js +++ b/compute.js @@ -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); diff --git a/views/query.jade b/views/query.jade index bdf3d6b0a..492d37514 100644 --- a/views/query.jade +++ b/views/query.jade @@ -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