From 38d666fec090c6d43d1547ddd678937b2a7f9ffd Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Sat, 23 Apr 2022 00:40:09 +0400 Subject: [PATCH] feat: filter out non-existent questions on frontpage --- src/backend/frontpage.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/frontpage.ts b/src/backend/frontpage.ts index e50ab0f..beb106d 100644 --- a/src/backend/frontpage.ts +++ b/src/backend/frontpage.ts @@ -9,7 +9,9 @@ export async function getFrontpage(): Promise { question: true, }, }) - ).map((f) => f.question); + ) + .map((f) => f.question) + .filter((q) => q); return questions; }