Browse Source

Fix viewing wiki commit on empty repo (#28040)

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

For some weird reason we need to cast this nil.
pull/28049/head
JakobDev 2 years ago committed by GitHub
parent
commit
48b9d98593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      routers/web/repo/middlewares.go

1
routers/web/repo/middlewares.go

@ -16,7 +16,6 @@ import ( @@ -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