Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
RafsanAmin committed Oct 12, 2024
1 parent 9ee8ebc commit 1fff720
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/api/getevents/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 1fff720

Please sign in to comment.