mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 04:05:42 +01:00
fix wrong system notice when repository is empty (#9010)
This commit is contained in:
parent
21ae9838e0
commit
c0c2624079
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue