Skip to content

Commit

Permalink
Avoid null error (#8034)
Browse files Browse the repository at this point in the history
  • Loading branch information
chidozieononiwu authored Apr 9, 2024
1 parent bca1ac5 commit 57a64de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dotnet/APIView/APIViewWeb/Managers/ReviewManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ public async Task<ReviewListItemModel> GetReviewAsync(ClaimsPrincipal user, stri
/// <returns></returns>
public async Task<IEnumerable<ReviewListItemModel>> GetReviewsAsync(IEnumerable<string> reviewIds, bool? isClosed = null)
{
if (reviewIds == null || !reviewIds.Any())
{
return new List<ReviewListItemModel>();
}
return await _reviewsRepository.GetReviewsAsync(reviewIds, isClosed);
}

Expand Down

0 comments on commit 57a64de

Please sign in to comment.