Skip to content

Commit 8003ebb

Browse files
committed
docs: TypeScript fix
1 parent 8ff2bf9 commit 8003ebb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/core/getting-started/data-dependency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function LoadMore() {
173173
const [nextPage, isPending] = useLoading(
174174
() => ctrl.fetch(PostResource.getList.getPage, { page: 2 }),
175175
);
176-
if (posts?.length % 3 !== 0) return null;
176+
if (!posts || posts.length % 3 !== 0) return null;
177177
return (
178178
<center>
179179
<button onClick={nextPage}>{isPending ? "..." : 'Load more'}</button>

0 commit comments

Comments
 (0)