From c498c07adf8ddceae573a95369accd6049ad42ba Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 27 Feb 2024 23:09:13 +0800 Subject: [PATCH] Fix missed return (#29450) (cherry picked from commit e9f4c2db8291c54044345aebd9381ac820ed9687) --- routers/api/v1/repo/file.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go index 238e92b971..72ada25ec7 100644 --- a/routers/api/v1/repo/file.go +++ b/routers/api/v1/repo/file.go @@ -672,6 +672,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 == "" {