Skip to content

Commit

Permalink
Fix missed return (#29450) (#29453)
Browse files Browse the repository at this point in the history
Backport #29450 by @lunny

Co-authored-by: Lunny Xiao <[email protected]>
  • Loading branch information
GiteaBot and lunny committed Feb 27, 2024
1 parent dc48eb0 commit 2df38af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions routers/api/v1/repo/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ func UpdateFile(ctx *context.APIContext) {
apiOpts := web.GetForm(ctx).(*api.UpdateFileOptions)
if ctx.Repo.Repository.IsEmpty {
ctx.Error(http.StatusUnprocessableEntity, "RepoIsEmpty", fmt.Errorf("repo is empty"))
return
}

if apiOpts.BranchName == "" {
Expand Down

0 comments on commit 2df38af

Please sign in to comment.