summaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rwxr-xr-xindex.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/index.js b/index.js
index 511ab19..fe01e18 100755
--- a/index.js
+++ b/index.js
@@ -79,14 +79,19 @@ function commits(gitPath) {
var commits = [];
history.on("commit", function(commit) {
+ var author = null;
+ if (!_.isNull(commit.author())) {
+ author = {
+ name: commit.author().name(),
+ email: commit.author().email()
+ }
+ }
+
var commitData = {
sha: commit.sha(),
date: commit.date(),
message: commit.message(),
- author: {
- name: commit.author().name(),
- email: commit.author().email()
- }
+ author: author
};
commits.push(commitData);