summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/list.tmpl
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-03-07 02:25:54 +0000
committerGitHub <noreply@github.com>2021-03-07 10:25:54 +0800
commitbeed5476e2831f7a0943d484873f4f49dfdd256f (patch)
tree8563bd478dc66521ac23f814e780af33023dfd49 /templates/repo/issue/list.tmpl
parent4ba8572361f7d8067efd6b0ce36c259eac6c5b4d (diff)
downloadgitea-beed5476e2831f7a0943d484873f4f49dfdd256f.tar.gz
gitea-beed5476e2831f7a0943d484873f4f49dfdd256f.zip
Prevent panic when empty MilestoneID in repo/issue/list (#14911)
This PR adds a simple check to only test the MilestoneID if it is not empty. Fix #14906 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/repo/issue/list.tmpl')
-rw-r--r--templates/repo/issue/list.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 26eb0e27c1..904b4d8bd0 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -56,7 +56,7 @@
<div class="menu">
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_milestone_no_select"}}</a>
{{range .Milestones}}
- <a class="{{if eq $.MilestoneID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&assignee={{$.AssigneeID}}">{{.Name}}</a>
+ <a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected{{end}}{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&assignee={{$.AssigneeID}}">{{.Name}}</a>
{{end}}
</div>
</div>