diff options
author | Vitaly Takmazov | 2023-10-08 21:58:05 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-10-08 21:58:05 +0300 |
commit | 3d5af69cbdb9820e5515424a38bd230c6f9e6504 (patch) | |
tree | 93367577b6c5a5db931e0bbc74d69788d0a05dd4 /vnext/src/ui/Comment.js | |
parent | 69ec9ec1d468eae71c0bd02b7dd7d6d6c13d291c (diff) |
vnext: fix remaining unauthenticated components
Diffstat (limited to 'vnext/src/ui/Comment.js')
-rw-r--r-- | vnext/src/ui/Comment.js | 4 |
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 ? ( |