feat: filter out non-existent questions on frontpage

This commit is contained in:
Vyacheslav Matyukhin 2022-04-23 00:40:09 +04:00
parent 34cfa31fe9
commit 38d666fec0
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C

View File

@ -9,7 +9,9 @@ export async function getFrontpage(): Promise<Question[]> {
question: true,
},
})
).map((f) => f.question);
)
.map((f) => f.question)
.filter((q) => q);
return questions;
}