Skip to content

Commit

Permalink
🐛 Fix undefined appearing after a commit link
Browse files Browse the repository at this point in the history
When a commit does not have a closes expression,
`undefined` was appearing next to the commit link.
  • Loading branch information
abe33 committed May 28, 2014
1 parent a5a18bd commit 879d060
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bin/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ get_commit_closes = function(commit) {
closes = commit.closes.map(link_to_issue).join(', ');
if (closes.length > 0) {
return ", " + closes;
} else {
return '';
}
};

Expand Down
5 changes: 4 additions & 1 deletion src/markdown_utils.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ get_commit_body = (commit, section_config) ->

get_commit_closes = (commit) ->
closes = commit.closes.map(link_to_issue).join(', ')
", #{closes}" if closes.length > 0
if closes.length > 0
", #{closes}"
else
''

get_commit_output = (commit, section_config) ->
closes = get_commit_closes(commit)
Expand Down

0 comments on commit 879d060

Please sign in to comment.