Skip to content

Commit cf1949c

Browse files
committed
fix
1 parent f1b1264 commit cf1949c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

routers/web/repo/pull.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -1276,11 +1276,10 @@ func PullsNewRedirect(ctx *context.Context) {
12761276
if repo.IsFork {
12771277
if err := repo.GetBaseRepo(ctx); err != nil {
12781278
ctx.ServerError("GetBaseRepo", err)
1279+
return
12791280
}
1280-
if repo.BaseRepo != nil {
1281-
redirectRepo = repo.BaseRepo
1282-
branch = fmt.Sprintf("%s:%s", repo.OwnerName, branch)
1283-
}
1281+
redirectRepo = repo.BaseRepo
1282+
branch = fmt.Sprintf("%s:%s", repo.OwnerName, branch)
12841283
}
12851284
ctx.Redirect(fmt.Sprintf("%s/compare/%s...%s?expand=1", redirectRepo.Link(), util.PathEscapeSegments(redirectRepo.DefaultBranch), util.PathEscapeSegments(branch)))
12861285
}

0 commit comments

Comments
 (0)