Skip to content

Commit

Permalink
Fix missed return (#29450)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Feb 27, 2024
1 parent 9a8c90e commit e9f4c2d
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 @@ -655,6 +655,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 e9f4c2d

Please sign in to comment.