From 42cd97962a6ff2c2bfcd57ed7540717c8dde81ca Mon Sep 17 00:00:00 2001 From: Jim O'Donnell Date: Tue, 26 Mar 2024 16:31:07 +0000 Subject: [PATCH] fix: project.slug is undefined in Talk comments (#7068) Fix an error where `project.slug` is undefined in Talk search results, leading to raw markdown strings being passed to the HTML parser in the `Markdown` component. --- app/talk/search-result.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/talk/search-result.jsx b/app/talk/search-result.jsx index 7e498d98f1..3337e4e56b 100644 --- a/app/talk/search-result.jsx +++ b/app/talk/search-result.jsx @@ -50,6 +50,9 @@ export default class TalkSearchResult extends React.Component { const comment = this.props.data; const discussion = this.discussionFromComment(comment); const [owner, name] = comment.project_slug ? comment.project_slug.split('/') : []; + const commentProject = { + slug: comment?.project_slug || '' + } return (
@@ -67,7 +70,7 @@ export default class TalkSearchResult extends React.Component { )} {comment.discussion_title} - +
);