소스 검색

fix wrong system notice when repository is empty (#9010)

tags/v1.11.0-rc1
Lunny Xiao 4 년 전
부모
커밋
c0c2624079
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5
    0
      routers/repo/middlewares.go

+ 5
- 0
routers/repo/middlewares.go 파일 보기

@@ -10,6 +10,11 @@ import (

// SetEditorconfigIfExists set editor config as render variable
func SetEditorconfigIfExists(ctx *context.Context) {
if ctx.Repo.Repository.IsEmpty {
ctx.Data["Editorconfig"] = nil
return
}

ec, err := ctx.Repo.GetEditorconfig()

if err != nil && !git.IsErrNotExist(err) {

Loading…
취소
저장