Skip to content

Commit 748e95d

Browse files
committed
Lint
1 parent a699af2 commit 748e95d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

routers/repo/branch.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ func deleteBranch(ctx *context.Context, branchName string) error {
193193

194194
func loadBranches(ctx *context.Context, page, pageSize int) ([]*Branch, int) {
195195
defaultBranch, err := repo_module.GetBranch(ctx.Repo.Repository, ctx.Repo.Repository.DefaultBranch)
196+
if err != nil {
197+
ctx.ServerError("GetDefaultBranch", err)
198+
return nil, 0
199+
}
200+
196201
rawBranches, err := repo_module.GetBranches(ctx.Repo.Repository)
197202
if err != nil {
198203
ctx.ServerError("GetBranches", err)

0 commit comments

Comments
 (0)