Skip to content

Commit

Permalink
Fix NullReferenceException in MergeRequestCommentClient.Get (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
meziantou authored May 10, 2023
1 parent 088e08e commit ecea587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NGitLab.Mock/Clients/MergeRequestCommentClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void Delete(long id)
using (Context.BeginOperationScope())
{
var comments = GetMergeRequest().Comments.Select(mr => mr.ToMergeRequestCommentClient());
var orderByUpdated = query.OrderBy.Equals("updated_at", StringComparison.Ordinal);
var orderByUpdated = query.OrderBy != null && query.OrderBy.Equals("updated_at", StringComparison.Ordinal);

if (string.Equals(query.Sort, "asc", StringComparison.Ordinal))
{
Expand Down

0 comments on commit ecea587

Please sign in to comment.