From 1fff720c192cb075b8791576d6281cd802bbda25 Mon Sep 17 00:00:00 2001 From: RafsanAmin Date: Sat, 12 Oct 2024 18:55:24 +0600 Subject: [PATCH] up --- src/app/api/getevents/route.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/api/getevents/route.ts b/src/app/api/getevents/route.ts index 6b51b61..9269095 100644 --- a/src/app/api/getevents/route.ts +++ b/src/app/api/getevents/route.ts @@ -87,7 +87,10 @@ export async function POST(req: NextRequest) { imageURL: e.data().imageURL, description: e.data().description, category: e.data().category, - participated: userParticipated.includes(e.id), + participated: + userParticipated && Array.isArray(userParticipated) + ? userParticipated.includes(e.id) + : false, })); return NextResponse.json({