From 61c0521e2a80707c25f4e60ba6c18f5478bbae0a Mon Sep 17 00:00:00 2001 From: dhrumit parmar Date: Mon, 22 Jul 2024 17:55:42 +0530 Subject: [PATCH] Remove unwanted changes --- lib/discussion.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/discussion.ts b/lib/discussion.ts index 29ab45c3..fdba95f4 100644 --- a/lib/discussion.ts +++ b/lib/discussion.ts @@ -55,16 +55,16 @@ export async function fetchGithubDiscussion( }); if (user) { - return await discussions.filter( + return discussions.filter( (discussion) => (discussion.participants ?? []).includes(user) || discussion.author === user, ); } else if (noOfDiscussion) { return discussions.slice(0, noOfDiscussion); + } else { + return discussions; } - - return discussions; } export async function checkAnsweredByUser(