Browse Source

Fix viewing wiki commit on empty repo (#28040) (#28044)

Backport #28040 by @JakobDev

Fixes https://codeberg.org/forgejo/forgejo/issues/1758

For some weird reason we need to cast this nil.

Co-authored-by: JakobDev <jakobdev@gmx.de>
tags/v1.21.0
Giteabot 7 months ago
parent
commit
124a9957d0
No account linked to committer's email address
1 changed files with 0 additions and 1 deletions
  1. 0
    1
      routers/web/repo/middlewares.go

+ 0
- 1
routers/web/repo/middlewares.go View File

@@ -16,7 +16,6 @@ import (
// SetEditorconfigIfExists set editor config as render variable
func SetEditorconfigIfExists(ctx *context.Context) {
if ctx.Repo.Repository.IsEmpty {
ctx.Data["Editorconfig"] = nil
return
}


Loading…
Cancel
Save