diff --git a/src/views/pending-post/pending-post.tsx b/src/views/pending-post/pending-post.tsx index dd7d74f0..9f1623ea 100644 --- a/src/views/pending-post/pending-post.tsx +++ b/src/views/pending-post/pending-post.tsx @@ -20,8 +20,7 @@ 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) {