summaryrefslogtreecommitdiff
path: root/web/template
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-12-12 15:44:54 +0100
committerLibravatar GitHub <noreply@github.com>2023-12-12 14:44:54 +0000
commitd0bb8f09738d23a79688cf5e69730b1d81b37b08 (patch)
treebe02845269155c99d6a50165bacaa8cb2d9a3692 /web/template
parent[bugfix] poll vote count fixes (#2444) (diff)
downloadgotosocial-d0bb8f09738d23a79688cf5e69730b1d81b37b08.tar.xz
[bugfix] Let templates deref pointers, as a treat (#2448)v0.13.0-rc2
Diffstat (limited to 'web/template')
-rw-r--r--web/template/status_poll.tmpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/web/template/status_poll.tmpl b/web/template/status_poll.tmpl
index d26046283..a900f5e74 100644
--- a/web/template/status_poll.tmpl
+++ b/web/template/status_poll.tmpl
@@ -50,15 +50,17 @@
{{- if isNil $pollOption.VotesCount }}
Results not yet published.
{{- else -}}
+ {{- with deref $pollOption.VotesCount }}
<span class="poll-vote-share">{{- $pollOption.VoteShareStr -}}&#37;</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 }}