Skip to content

Commit eed6b28

Browse files
authored
Fix template error in pull request with deleted head repo (#24192)
Rendering of Allow Edits from Maintainers did not check if the head repo exists, while other parts of the page handle it gracefully.
1 parent b39a5bb commit eed6b28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/issue/view_content/sidebar.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@
690690
</div>
691691
{{end}}
692692

693-
{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed)}}
693+
{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
694694
{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
695695
<div class="ui divider"></div>
696696
<div class="inline field">

0 commit comments

Comments
 (0)