~ruther/NosSmooth

28287bbe09259135da47a1704a4371e59c4704f2 — František Boháček 3 years ago 4fcde38
fix: allow converting empty lists
1 files changed, 1 insertions(+), 2 deletions(-)

M Core/NosSmooth.Packets/Converters/Special/ListTypeConverter.cs
M Core/NosSmooth.Packets/Converters/Special/ListTypeConverter.cs => Core/NosSmooth.Packets/Converters/Special/ListTypeConverter.cs +1 -2
@@ 45,7 45,7 @@ public class ListTypeConverter : ISpecialTypeConverter
        var data = new List<object?>();
        var genericType = type.GetElementType() ?? type.GetGenericArguments()[0];

        do
        while (!(stringEnumerator.IsOnLastToken() ?? false))
        {
            if (!stringEnumerator.PushPreparedLevel())
            {


@@ 70,7 70,6 @@ public class ListTypeConverter : ISpecialTypeConverter

            data.Add(result.Entity);
        }
        while (!(stringEnumerator.IsOnLastToken() ?? false));

        return _fillFunctions.GetOrAdd(genericType, GetAndFillListMethod)(data);
    }

Do not follow this link