We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21ae983 commit c0c2624Copy full SHA for c0c2624
routers/repo/middlewares.go
@@ -10,6 +10,11 @@ import (
10
11
// SetEditorconfigIfExists set editor config as render variable
12
func SetEditorconfigIfExists(ctx *context.Context) {
13
+ if ctx.Repo.Repository.IsEmpty {
14
+ ctx.Data["Editorconfig"] = nil
15
+ return
16
+ }
17
+
18
ec, err := ctx.Repo.GetEditorconfig()
19
20
if err != nil && !git.IsErrNotExist(err) {
0 commit comments