aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Comment.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Comment.js')
-rw-r--r--vnext/src/ui/Comment.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnext/src/ui/Comment.js b/vnext/src/ui/Comment.js
index 6ba34ff0..3a3f4429 100644
--- a/vnext/src/ui/Comment.js
+++ b/vnext/src/ui/Comment.js
@@ -53,7 +53,7 @@ export default function Comment({ msg, draft, active, setActive, onStartEditing,
</div>
{
msg.body &&
- <div className={visitor.uid === msg.user.uid ? 'msg-bubble msg-bubble-my' : 'msg-bubble'}>
+ <div className={visitor && visitor.uid === msg.user.uid ? 'msg-bubble msg-bubble-my' : 'msg-bubble'}>
<div ref={msgRef}>
<p dangerouslySetInnerHTML={{ __html: format(msg.body, msg.mid.toString(), (msg.tags || []).indexOf('code') >= 0) }} />
</div>
@@ -71,7 +71,7 @@ export default function Comment({ msg, draft, active, setActive, onStartEditing,
{
active === msg.rid && <MessageInput text={draft || ''} onSend={postComment} placeholder="Write a comment..." />
}
- {visitor.uid > 0 &&
+ {visitor && visitor.uid > 0 &&
<div className="msg-links">
{
visitor.uid > 0 ? (