From f75b87dd29ac3b9e8563a8ed5a45a517b46d49b6 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 14 Dec 2021 10:39:06 +0800 Subject: [PATCH] simple code --- routers/web/repo/compare.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index 2f23ff846833..fd5050792889 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -217,7 +217,7 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo { infoPath = ctx.Params("*") var infos []string if infoPath == "" { - infos = []string{ctx.Repo.Repository.DefaultBranch, ctx.Repo.Repository.DefaultBranch} + infos = []string{baseRepo.DefaultBranch, baseRepo.DefaultBranch} } else { infos = strings.SplitN(infoPath, "...", 2) if len(infos) != 2 {