Skip to content

Commit

Permalink
Restore original authors ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Sep 3, 2024
1 parent 4292b11 commit abd307c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Netkan/Extensions/JObjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ public static void SafeMerge(this JObject jobject, string propertyName, JToken?

public static JToken? FromMessyList<T>(T? first, IEnumerable<T?>? rest) where T: notnull
{
var items = Enumerable.Repeat(first, 1)
.Concat(rest ?? Enumerable.Empty<T?>())
.OfType<T>()
.Distinct()
.ToList();
var items = (rest ?? Enumerable.Empty<T?>())
.Append(first)
.OfType<T>()
.Distinct()
.ToList();
return items.Count switch
{
0 => null,
Expand Down

0 comments on commit abd307c

Please sign in to comment.