From 9d08d3fbf5ca28fe8f056b9552bb06079fbaf449 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 7 Dec 2024 22:38:21 -0800 Subject: [PATCH] Fix compare page bug view as anonymous (#32754) Fix a bug introduced from https://github.com/go-gitea/gitea/pull/32403/files#diff-dc86301f15109eee38296d469630672193e0587ad1485fdd8f503bf4c789cf7eR692 --- routers/web/repo/issue_page_meta.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routers/web/repo/issue_page_meta.go b/routers/web/repo/issue_page_meta.go index 7eda6e3c73..b536b04d7c 100644 --- a/routers/web/repo/issue_page_meta.go +++ b/routers/web/repo/issue_page_meta.go @@ -195,7 +195,9 @@ func (d *IssuePageMetaData) retrieveReviewersData(ctx *context.Context) { var reviews issues_model.ReviewList if d.Issue == nil { - posterID = ctx.Doer.ID + if ctx.Doer != nil { + posterID = ctx.Doer.ID + } } else { posterID = d.Issue.PosterID if d.Issue.OriginalAuthorID > 0 {