fix: ssr issue, close #378

This commit is contained in:
Xylight committed 2024-07-25 10:08:30 -07:00
1 parent 998dcb7db2
commit 3631cb4627
2 files changed
+12 -3

No files matched your search

+10 -1
View File
@@ -51,7 +51,16 @@ export async function postFeed(args: {
instance: get(instance),
})
return get(postFeeds)[args.id].data
return (
get(postFeeds)[args.id]?.data ?? {
...args.request,
posts: posts,
cursor: {
next: posts.next_page,
},
type_: args.request.type_,
}
)
}
export function getPostFeed(feeds: Map<PostFeedID, PostFeed>, id: PostFeedID) {