Fix post page for logged out users

This commit is contained in:
Eduard Urbach 2018-11-06 04:33:37 +09:00
parent 8450e34077
commit 2ab2b1e0e9

View File

@ -4,7 +4,7 @@ component Post(post *arn.Post, user *arn.User)
Postable(post, user, true, "", "")
.side-note-container.mountable
if user.Role == "admin"
if user != nil && user.Role == "admin"
a.side-note.tip(href=post.Link() + "/edit", aria-label="Admin Edit")
Icon("edit")