From 3d5af69cbdb9820e5515424a38bd230c6f9e6504 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Sun, 8 Oct 2023 21:58:05 +0300
Subject: vnext: fix remaining unauthenticated components
---
vnext/src/ui/Thread.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'vnext/src/ui/Thread.js')
diff --git a/vnext/src/ui/Thread.js b/vnext/src/ui/Thread.js
index 61474153..4fc049c3 100644
--- a/vnext/src/ui/Thread.js
+++ b/vnext/src/ui/Thread.js
@@ -28,7 +28,7 @@ export default function Thread(props) {
const [editing, setEditing] = useState(emptyMessage)
const [visitor] = useVisitor()
- const [hash] = useState(visitor.hash)
+ const [hash] = useState(visitor?.hash)
const { mid } = params
let loadReplies = useCallback(() => {
@@ -131,7 +131,7 @@ export default function Thread(props) {
{
message.mid ? (
- {active === (message.rid || 0) && visitor.uid > 0 && Write a comment...}
+ {active === (message.rid || 0) && visitor && visitor.uid > 0 && Write a comment...}
) : (
--
cgit v1.2.3