From d6d3369e23eb9827c05f4aef424f0a50609861c6 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Tue, 8 Oct 2019 08:17:41 -0300 Subject: [PATCH] fix: Fixed 'split' of undefined (close #611) (#678) --- src/historyView/common.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/historyView/common.ts b/src/historyView/common.ts index 9536dce3..602a06ae 100644 --- a/src/historyView/common.ts +++ b/src/historyView/common.ts @@ -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 = ""; + if (commit.msg) { + commitMsg = commit.msg.split(/\r?\n/, 1)[0]; + } + return `${commitMsg} • r${commit.revision}`; } export function getCommitToolTip(commit: ISvnLogEntry): string {