diff --git a/package/package.json b/package/package.json index 8603321..6cecb8f 100644 --- a/package/package.json +++ b/package/package.json @@ -1,6 +1,6 @@ { "name": "hashnode-client", - "version": "1.0.2", + "version": "1.0.3", "type": "module", "description": "A JavaScript client for the Headless Hashnode. The package contains helpful ReactJS hooks to use blog data using its GraphQL APIs.", "author": { diff --git a/package/src/useHashnodeComments.js b/package/src/useHashnodeComments.js index 41919ec..c8d4c12 100644 --- a/package/src/useHashnodeComments.js +++ b/package/src/useHashnodeComments.js @@ -38,7 +38,7 @@ export default function useHashnodeComments(settings = {}) { }, [host, first, endCursor, slug]); const loadMoreComments = useCallback(() => { - getCommentsForPost(host, slug, first, endCursor, true); + getCommentsForPost(host, slug, first, pageInfo.endCursor, true); }, [pageInfo.endCursor]); return {