diff --git a/web/src/lib/components/comment/comments.ts b/web/src/lib/components/comment/comments.ts index 0f5f5f244..221d9a638 100644 --- a/web/src/lib/components/comment/comments.ts +++ b/web/src/lib/components/comment/comments.ts @@ -146,7 +146,9 @@ export function filterCommentsByCommit( return comments.filter((comment) => { const embed = comment.embed; if (!embed) return true; - const commit = commits.find((c) => c.hash === embed.commit || c.changeId === embed.change); + const commit = commits.find( + (c) => c.hash === embed.commit || (!!embed.change && c.changeId === embed.change) + ); return !!commit && filter(commit); }); }