Skip to content

Commit

Permalink
docs: TypeScript fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Jul 21, 2024
1 parent 8ff2bf9 commit 8003ebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/core/getting-started/data-dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function LoadMore() {
const [nextPage, isPending] = useLoading(
() => ctrl.fetch(PostResource.getList.getPage, { page: 2 }),
);
if (posts?.length % 3 !== 0) return null;
if (!posts || posts.length % 3 !== 0) return null;
return (
<center>
<button onClick={nextPage}>{isPending ? "..." : 'Load more'}</button>
Expand Down

0 comments on commit 8003ebb

Please sign in to comment.