Skip to content

Commit 98bbb2e

Browse files
lunnyGiteaBot
authored andcommitted
Fix missed return (go-gitea#29450)
1 parent dc48eb0 commit 98bbb2e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

routers/api/v1/repo/file.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ func UpdateFile(ctx *context.APIContext) {
649649
apiOpts := web.GetForm(ctx).(*api.UpdateFileOptions)
650650
if ctx.Repo.Repository.IsEmpty {
651651
ctx.Error(http.StatusUnprocessableEntity, "RepoIsEmpty", fmt.Errorf("repo is empty"))
652+
return
652653
}
653654

654655
if apiOpts.BranchName == "" {

0 commit comments

Comments
 (0)