From 31df012968bd0acb3ed6748c7bf0f99d8ecc4031 Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Sat, 23 May 2020 21:49:48 +0200 Subject: Properly handle and return empty string for dangling commits in GetBranchName (#11587) --- models/issue_comment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/issue_comment.go b/models/issue_comment.go index e23fae6715..3f2ee8b7d9 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -1129,7 +1129,7 @@ func getCommitIDsFromRepo(repo *Repository, oldCommitID, newCommitID, baseBranch return nil, false, err } - if oldCommitBranch == "undefined" { + if oldCommitBranch == "" { commitIDs = make([]string, 2) commitIDs[0] = oldCommitID commitIDs[1] = newCommitID -- cgit v1.2.3