diff --git a/githubpoints-projects.js b/githubpoints-projects.js index 25d86c3..b4a4f64 100644 --- a/githubpoints-projects.js +++ b/githubpoints-projects.js @@ -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');