Skip to content

Commit

Permalink
Remove unwanted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dgparmar14 committed Jul 22, 2024
1 parent 66a86ab commit 61c0521
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/discussion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 61c0521

Please sign in to comment.