Skip to content

Commit

Permalink
fix: Fixed 'split' of undefined (close #611) (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias authored and JohnstonCode committed Oct 8, 2019
1 parent b86c0f5 commit d6d3369
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/historyView/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,11 @@ export function getCommitIcon(
}

export function getCommitLabel(commit: ISvnLogEntry): string {
const fstLine = commit.msg.split(/\r?\n/, 1)[0];
return `${fstLine} • r${commit.revision}`;
let commitMsg = "<blank>";
if (commit.msg) {
commitMsg = commit.msg.split(/\r?\n/, 1)[0];
}
return `${commitMsg} • r${commit.revision}`;
}

export function getCommitToolTip(commit: ISvnLogEntry): string {
Expand Down

0 comments on commit d6d3369

Please sign in to comment.