diff --git a/src/views/pending-post/pending-post.tsx b/src/views/pending-post/pending-post.tsx index 6e12f491..e7f11c56 100644 --- a/src/views/pending-post/pending-post.tsx +++ b/src/views/pending-post/pending-post.tsx @@ -17,7 +17,8 @@ const PendingPost = () => { (!isNaN(parseInt(accountCommentIndex)) && parseInt(accountCommentIndex) >= 0 && Number.isInteger(parseFloat(accountCommentIndex)) && - (accountComments?.length === 0 || parseInt(accountCommentIndex) < accountComments.length)); + accountComments?.length > 0 && + parseInt(accountCommentIndex) < accountComments.length); useEffect(() => { if (!isValidAccountCommentIndex) {