Browse Source

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

tags/v1.10.1
Lunny Xiao 6 years ago committed by GitHub
parent
commit
fd461ca555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      routers/repo/middlewares.go

5
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…
Cancel
Save