From 50490187a224793935d4e117643e0122254054a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionic=C4=83=20Biz=C4=83u?= Date: Mon, 13 Jul 2015 10:53:04 +0300 Subject: [PATCH] Check the commit value --- lib/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/index.js b/lib/index.js index 536c97a..08f1f3b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -445,6 +445,7 @@ GitStats.prototype.globalActivity = function (options, callback) { ; GitLogParser(Spawn("git", ["log", "--since", options.start.format(DATE_FORMAT), "--until", options.end.format(DATE_FORMAT)], { cwd: options.repo }).stdout).on("commit", function(commit) { + if (!commit) { return; } today = Moment(commit.date).format(DATE_FORMAT); commits[today] = commits[today] || 0; ++commits[today];