mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 17:52:24 -05:00
[bugfix] Let templates deref pointers, as a treat (#2448)
This commit is contained in:
parent
ac48192562
commit
d0bb8f0973
2 changed files with 20 additions and 3 deletions
|
|
@ -50,15 +50,17 @@
|
|||
{{- if isNil $pollOption.VotesCount }}
|
||||
Results not yet published.
|
||||
{{- else -}}
|
||||
{{- with deref $pollOption.VotesCount }}
|
||||
<span class="poll-vote-share">{{- $pollOption.VoteShareStr -}}%</span>
|
||||
<span class="poll-vote-count">
|
||||
{{- if eq $pollOption.VotesCount 1 -}}
|
||||
{{- $pollOption.VotesCount }} vote
|
||||
{{- if eq . 1 -}}
|
||||
{{- . }} vote
|
||||
{{- else -}}
|
||||
{{- $pollOption.VotesCount }} votes
|
||||
{{- . }} votes
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
</div>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue