diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-07 20:23:39 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-07 20:23:39 +0200 |
| commit | 72165f52411deaf633a7d6c301f0650c94f79671 (patch) | |
| tree | 29c2626e94eeaf8c483b29ebc18b2f5382e985a2 | |
| parent | 241a277b78d9b3f94ddee550e2d6e7f08fff2a95 (diff) | |
| download | compiler-72165f52411deaf633a7d6c301f0650c94f79671.tar.gz compiler-72165f52411deaf633a7d6c301f0650c94f79671.zip | |
fix NaN stat
| -rw-r--r-- | worker.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -163,7 +163,8 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost", participant_stats.kills = participant.get("kills"); - participant_stats.kill_participation = participant.get("kills") / participant.roster.get("hero_kills"); + if (participant.roster.get("hero_kills") == 0) participant_stats.kill_participation = 0; + else participant_stats.kill_participation = participant.get("kills") / participant.roster.get("hero_kills"); return participant_stats; } |
