Fix null property access bug

This commit is contained in:
David Granado 2022-01-21 20:57:49 -06:00 committed by Thomas Zarebczan
parent a8418025db
commit 7dfbe5a539

View file

@ -46,7 +46,7 @@ function CommentsReplies(props: Props) {
const [commentsToDisplay, setCommentsToDisplay] = React.useState(fetchedReplies); const [commentsToDisplay, setCommentsToDisplay] = React.useState(fetchedReplies);
const isResolvingReplies = fetchedReplies && resolvedReplies.length !== fetchedReplies.length; const isResolvingReplies = fetchedReplies && resolvedReplies.length !== fetchedReplies.length;
const alreadyResolved = !isResolvingReplies && resolvedReplies.length !== 0; const alreadyResolved = !isResolvingReplies && resolvedReplies.length !== 0;
const canDisplayComments = commentsToDisplay && commentsToDisplay.length === fetchedReplies.length; const canDisplayComments = commentsToDisplay && commentsToDisplay.length === fetchedReplies?.length;
// Batch resolve comment channel urls // Batch resolve comment channel urls
React.useEffect(() => { React.useEffect(() => {