Added nil check
This commit is contained in:
parent
df43cab6bd
commit
57188cfd4f
@ -43,9 +43,10 @@ component Postable(post arn.Postable, user *arn.User, highlightAuthorID string)
|
||||
Icon("pencil")
|
||||
|
||||
if post.Type() != "Thread"
|
||||
if user.Role == "admin" || user.Role == "editor"
|
||||
if user != nil && (user.Role == "admin" || user.Role == "editor")
|
||||
a.post-tool.post-delete.action(data-action="deletePost", data-trigger="click", data-id=post.ID(), title="Delete")
|
||||
Icon("trash")
|
||||
|
||||
a.post-tool.post-permalink.ajax(href=post.Link(), title="Permalink")
|
||||
Icon("link")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user