diff --git a/src/routes/profile/user/+page.ts b/src/routes/profile/user/+page.ts index 729a287c..e345078e 100644 --- a/src/routes/profile/user/+page.ts +++ b/src/routes/profile/user/+page.ts @@ -17,7 +17,7 @@ export async function load({ url, fetch, parent }) { sort: sort, }) - const items = [...user.posts, ...user.comments] + const items = [...(type == 'all' || type == 'posts' ? user.posts : []), ...(type == 'all' || type == 'comments' ? user.comments : []),] if (sort == 'TopAll') { items.sort(