Fix findLatestPosts implementation
This commit is contained in:
@ -82,5 +82,5 @@ export const findLatestPosts = async ({ count }: { count?: number }): Promise<Ar
|
|||||||
const _count = count || 4;
|
const _count = count || 4;
|
||||||
const posts = await fetchPosts();
|
const posts = await fetchPosts();
|
||||||
|
|
||||||
return posts ? posts.slice(_count * -1) : [];
|
return posts ? posts.slice(0, _count) : [];
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user