Skip to content

Commit

Permalink
Fix missed return (go-gitea#29450)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored and GiteaBot committed Feb 27, 2024
1 parent dc48eb0 commit 98bbb2e
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 98bbb2e

Please sign in to comment.