Fix divide by zero error

This commit is contained in:
José Carlos Cuevas 2019-05-07 11:36:06 +02:00
parent d51e5b5352
commit 05b97399c0

View file

@ -12,9 +12,14 @@ var calculateIssuePoints = function () {
var drawProgressBars = function(to_do, doing, done) {
let total = to_do + doing + done;
let doing_percent = 0;
let done_percent = 0;
let doing_percent = (doing / total) * 100;
let done_percent = (done / total) * 100;
if (total > 0) {
let doing_percent = (doing / total) * 100;
let done_percent = (done / total) * 100;
}
let pointsBarElement = document.getElementById('pointsBar');