From 48b9d9859331cb7a76ad5719ebbb21e2f598b75b Mon Sep 17 00:00:00 2001 From: JakobDev Date: Tue, 14 Nov 2023 12:42:23 +0100 Subject: [PATCH] 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. --- routers/web/repo/middlewares.go | 1 - 1 file changed, 1 deletion(-) diff --git a/routers/web/repo/middlewares.go b/routers/web/repo/middlewares.go index b50e96be3c..5f4a219aa3 100644 --- a/routers/web/repo/middlewares.go +++ b/routers/web/repo/middlewares.go @@ -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 }