summaryrefslogtreecommitdiff
path: root/worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'worker.js')
-rw-r--r--worker.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/worker.js b/worker.js
index 5c1c5bf..84203ec 100644
--- a/worker.js
+++ b/worker.js
@@ -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;
}