1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-13 21:54:24 +00:00

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>
This commit is contained in:
Giteabot 2023-11-14 21:49:12 +08:00 committed by GitHub
parent d72e20627d
commit 124a9957d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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