From 66681c33ffd42f636528a40a0b0c3fcd1a37aba2 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 9 Oct 2024 18:42:55 -0700 Subject: [PATCH] merge if conditions --- routers/web/repo/issue.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 47949635370..43ac971a2a1 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -2105,11 +2105,10 @@ func ViewIssue(ctx *context.Context) { } ctx.Data["DevLinks"] = devLinks for _, link := range devLinks { - if link.LinkType == issues_model.IssueDevLinkTypePullRequest { - if !(link.PullRequest.Issue.IsClosed && !link.PullRequest.HasMerged) { - ctx.Data["MaybeFixed"] = link.PullRequest - break - } + if link.LinkType == issues_model.IssueDevLinkTypePullRequest && + !(link.PullRequest.Issue.IsClosed && !link.PullRequest.HasMerged) { + ctx.Data["MaybeFixed"] = link.PullRequest + break } } }