fix: mixing timeline with no posts

This commit is contained in:
Kieran 2023-11-10 10:01:50 +00:00
parent 36c1d9502c
commit e72190b49f
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -131,6 +131,12 @@ function weaveTimeline(
// always skip 5 posts from start to avoid heavy handed weaving
const skip = 5;
if (main.length < skip) {
return [
{ events: main, refTime: unixNow() }
]
}
const frags = Object.entries(hashtags).map(([k, v]) => {
const take = v.slice(0, 5);
return {