Skip to content

Commit d6d3369

Browse files
edgardmessiasJohnstonCode
authored andcommitted
fix: Fixed 'split' of undefined (close #611) (#678)
1 parent b86c0f5 commit d6d3369

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/historyView/common.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,11 @@ export function getCommitIcon(
220220
}
221221

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

227230
export function getCommitToolTip(commit: ISvnLogEntry): string {

0 commit comments

Comments
 (0)