From 54c03b96dc1a9cafd2e2db8139e3700f57c8c2ce Mon Sep 17 00:00:00 2001 From: Peter Bui Date: Thu, 27 Jul 2023 00:14:44 -0400 Subject: [PATCH] fix: properly load comments when sorting (#30) Need to set type_ to 'All' when calling getComments(). Otherwise, trying sort the comments on a post by "Top" or "New" will refresh without any comments. --- src/routes/post/[instance]/[id]/+page.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/post/[instance]/[id]/+page.svelte b/src/routes/post/[instance]/[id]/+page.svelte index 652af2f4..bbe4c422 100644 --- a/src/routes/post/[instance]/[id]/+page.svelte +++ b/src/routes/post/[instance]/[id]/+page.svelte @@ -61,6 +61,7 @@ max_depth: 3, page: commentsPage, limit: 25, + type_: 'All', post_id: data.post.post_view.post.id, sort: commentSort, }) @@ -203,6 +204,7 @@ max_depth: 3, page: ++commentsPage, limit: 25, + type_: 'All', post_id: data.post.post_view.post.id, })