From 7752c18e8211b9b303019ed5dec5634c9c946d4d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 3 Apr 2017 12:22:23 +0800 Subject: [PATCH] GitLogParser.js --- GitLogParser.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GitLogParser.js b/GitLogParser.js index ae106adb..4f7b635c 100644 --- a/GitLogParser.js +++ b/GitLogParser.js @@ -62,8 +62,7 @@ GitLogParser = { // shours should be: // hour : [ ] - var totals = {}; - + for (var i = 0; i < lines.length; i++) { var line = lines[i]; var hour = line.start.format('H'); @@ -86,8 +85,11 @@ GitLogParser = { shours[hour] = (typeof(shours[hour]) == 'undefined') ? {} : shours[hour]; shours[hour][line.desc] = (typeof(shours[hour][line.desc] ) == 'undefined') ? 0 : shours[hour][line.desc] ; shours[hour][line.desc] += line.span; + + } + this.total = total; this.shours = shours; return hours; -- 2.39.2