Skip to content

Commit

Permalink
Fixes accessibility of empty repository commit status (go-gitea#22632)
Browse files Browse the repository at this point in the history
Avoid empty labelled anchor in repo without commits.

Contributed by @forgejo.

<!--

Please check the following:

1. Make sure you are targeting the `main` branch, pull requests on
release branches are only allowed for bug fixes.
2. Read contributing guidelines:
https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md
3. Describe what your pull request does and which issue you're targeting
(if any)

-->

(cherry picked from commit 638e6160e84ac4625af35f4e473a8a8610ca06df)
  • Loading branch information
fsologureng authored and Loïc Dachary committed Feb 20, 2023
1 parent 82edd24 commit 42e27a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/repo/commit_statuses.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a class="ui link commit-statuses-trigger vm"{{if eq (len .Statuses) 1}}{{$status := index .Statuses 0}}{{if $status.TargetURL}} href="{{$status.TargetURL}}"{{end}}{{end}}>{{template "repo/commit_status" .Status}}</a>
{{if eq (len .Statuses) 1}}{{$status := index .Statuses 0}}{{if $status.TargetURL}}<a class="ui link commit-statuses-trigger vm" href="{{$status.TargetURL}}">{{template "repo/commit_status" .Status}}</a>{{end}}{{end}}
<div class="ui commit-statuses-popup commit-statuses tippy-target">
<div class="ui relaxed list divided">
{{range .Statuses}}
Expand Down

0 comments on commit 42e27a4

Please sign in to comment.