Fix #208 - check for comments without ids

This commit is contained in:
Ian Philips 2022-05-18 09:35:32 -06:00
parent 974d5a8d89
commit eb3ac802c0

View File

@ -44,7 +44,8 @@ export function FeedCommentThread(props: {
const [replyToUsername, setReplyToUsername] = useState('')
const user = useUser()
const commentsList = comments.filter(
(comment) => comment.replyToCommentId === parentComment.id
(comment) =>
parentComment.id && comment.replyToCommentId === parentComment.id
)
commentsList.unshift(parentComment)
const [inputRef, setInputRef] = useState<HTMLTextAreaElement | null>(null)