Skip to content

Commit

Permalink
Fix viewing wiki commit on empty repo (#28040) (#28044)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
GiteaBot and JakobDev authored Nov 14, 2023
1 parent d72e206 commit 124a995
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion routers/web/repo/middlewares.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 124a995

Please sign in to comment.