From b983071e79f8395c8130044b41ccd219f58fb7f3 Mon Sep 17 00:00:00 2001 From: snan Date: Thu, 11 Apr 2024 14:58:23 +0200 Subject: [PATCH] Fix parent comment linking when not showing context (#2417) The same code is reused for the "show context" button as for the "link to self" button. I'm not sure that's such a good idea in the long run. There was a const `parentCommentId` that was always set even when not having the `showContext` prop, causing the bug #2401. --- src/shared/components/comment/comment-node.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 6a0e29ab..895f9b47 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -501,14 +501,14 @@ export class CommentNode extends Component { ? I18NextService.i18n.t("show_context") : I18NextService.i18n.t("link"); - // The context button should show the parent comment by default - const parentCommentId = getCommentParentId(cv.comment) ?? cv.comment.id; - return ( <>