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

lunny/display_deleted_branch2
Lunny Xiao 5 years ago committed by zeripath
parent 21ae9838e0
commit c0c2624079

@ -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