diff --git a/editor/src/components/inspector/sections/comment-section.tsx b/editor/src/components/inspector/sections/comment-section.tsx index 8c6ab994422d..ba6e41b88b43 100644 --- a/editor/src/components/inspector/sections/comment-section.tsx +++ b/editor/src/components/inspector/sections/comment-section.tsx @@ -39,6 +39,7 @@ import { canvasPointToWindowPoint } from '../../canvas/dom-lookup' import { CommentRepliesCounter } from '../../canvas/controls/comment-replies-counter' import type { SelectOption } from '../controls/select-control' import { assertNever } from '../../../core/shared/utils' +import { pluck } from '../../../core/shared/array-utils' export type CommentFilterMode = 'all' | 'all-including-resolved' | 'unread-only' @@ -104,7 +105,8 @@ const ThreadPreviews = React.memo(() => { case 'all-including-resolved': return threads case 'unread-only': - return threads.filter((t) => !readThreads.includes(t)) + const readThreadIds = pluck(readThreads, 'id') + return threads.filter((t) => !readThreadIds.includes(t.id)) default: assertNever(commentFilterMode) }