aboutsummaryrefslogtreecommitdiff
path: root/client/html/comment.tpl
diff options
context:
space:
mode:
authorrr-2016-08-02 11:58:56 +0200
committerrr-2016-08-02 12:27:02 +0200
commit67f803a2f25a5e3f1a117df0d266c4b50c5c2642 (patch)
tree35306191828ca14d70b877defc4b33cf9f75754a /client/html/comment.tpl
parent688740afa98f65963e8e132ed2aed89eae4d4fa1 (diff)
client/general: fix support for deleted users
Diffstat (limited to 'client/html/comment.tpl')
-rw-r--r--client/html/comment.tpl12
1 files changed, 6 insertions, 6 deletions
diff --git a/client/html/comment.tpl b/client/html/comment.tpl
index 8cae159..c0aa766 100644
--- a/client/html/comment.tpl
+++ b/client/html/comment.tpl
@@ -1,12 +1,12 @@
<div class='comment'>
<div class='avatar'>
- <% if (ctx.comment.user.name && ctx.canViewUsers) { %>
+ <% if (ctx.comment.user && ctx.comment.user.name && ctx.canViewUsers) { %>
<a href='/user/<%- encodeURIComponent(ctx.comment.user.name) %>'>
<% } %>
- <%= ctx.makeThumbnail(ctx.comment.user.avatarUrl) %>
+ <%= ctx.makeThumbnail(ctx.comment.user ? ctx.comment.user.avatarUrl : null) %>
- <% if (ctx.comment.user.name && ctx.canViewUsers) { %>
+ <% if (ctx.comment.user && ctx.comment.user.name && ctx.canViewUsers) { %>
</a>
<% } %>
</div>
@@ -14,13 +14,13 @@
<div class='body'>
<header><!--
--><span class='nickname'><!--
- --><% if (ctx.comment.user.name && ctx.canViewUsers) { %><!--
+ --><% if (ctx.comment.user && ctx.comment.user.name && ctx.canViewUsers) { %><!--
--><a href='/user/<%- encodeURIComponent(ctx.comment.user.name) %>'><!--
--><% } %><!--
- --><%- ctx.comment.user.name %><!--
+ --><%- ctx.comment.user ? ctx.comment.user.name : 'Deleted user' %><!--
- --><% if (ctx.comment.user.name && ctx.canViewUsers) { %><!--
+ --><% if (ctx.comment.user && ctx.comment.user.name && ctx.canViewUsers) { %><!--
--></a><!--
--><% } %><!--
--></span><!--

© 2015 - 2026 Jakob L. Kreuze