From f27cd2d6ddf80bb41f75c065b27cc0d51441fff7 Mon Sep 17 00:00:00 2001 From: keyan Date: Tue, 26 Sep 2023 15:15:31 -0500 Subject: [PATCH] protect against comment root not having forwards --- components/comment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/comment.js b/components/comment.js index 3c90f814..56b7b15f 100644 --- a/components/comment.js +++ b/components/comment.js @@ -132,7 +132,7 @@ export default function Comment ({ // Don't show OP badge when anon user comments on anon user posts const op = root.user.name === item.user.name && Number(item.user.id) !== ANON_USER_ID ? 'OP' - : root.forwards.some(f => f.user.name === item.user.name) && Number(item.user.id) !== ANON_USER_ID + : root.forwards?.some(f => f.user.name === item.user.name) && Number(item.user.id) !== ANON_USER_ID ? 'OPG' : null const bountyPaid = root.bountyPaidTo?.includes(Number(item.id))