Skip to content

Commit e9f4c2d

Browse files
authored
Fix missed return (#29450)
1 parent 9a8c90e commit e9f4c2d

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
@@ -655,6 +655,7 @@ func UpdateFile(ctx *context.APIContext) {
655655
apiOpts := web.GetForm(ctx).(*api.UpdateFileOptions)
656656
if ctx.Repo.Repository.IsEmpty {
657657
ctx.Error(http.StatusUnprocessableEntity, "RepoIsEmpty", fmt.Errorf("repo is empty"))
658+
return
658659
}
659660

660661
if apiOpts.BranchName == "" {

0 commit comments

Comments
 (0)