Skip to content

Commit 2df38af

Browse files
GiteaBotlunny
andauthored
Fix missed return (#29450) (#29453)
Backport #29450 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent dc48eb0 commit 2df38af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

routers/api/v1/repo/file.go

+1
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)