Browse Source

Fix issue if "most recent comment" not found

Not sure exactly how this can happen, but I've seen a few errors caused
by this.
merge-requests/126/merge
Deimos 4 years ago
parent
commit
d3a84fe411
  1. 2
      tildes/tildes/templates/topic.jinja2

2
tildes/tildes/templates/topic.jinja2

@ -323,12 +323,14 @@
({{ pluralize(comments.num_top_level, "thread") }}) ({{ pluralize(comments.num_top_level, "thread") }})
</dd> </dd>
{% if comments.most_recent_comment %}
<dt>Last comment posted</dt> <dt>Last comment posted</dt>
<dd> <dd>
<a href="{{ comments.most_recent_comment.permalink }}" data-js-hide-sidebar-no-preventdefault> <a href="{{ comments.most_recent_comment.permalink }}" data-js-hide-sidebar-no-preventdefault>
{{ adaptive_date_responsive(comments.most_recent_comment.created_time) }} {{ adaptive_date_responsive(comments.most_recent_comment.created_time) }}
</a> </a>
</dd> </dd>
{% endif %}
{% else %} {% else %}
<dd>No comments yet</dd> <dd>No comments yet</dd>
{% endif %} {% endif %}

Loading…
Cancel
Save