diff --git a/Upsilon/BaseTypes/UserData/ListUserData.cs b/Upsilon/BaseTypes/UserData/ListUserData.cs index becd8eb..1543ce4 100644 --- a/Upsilon/BaseTypes/UserData/ListUserData.cs +++ b/Upsilon/BaseTypes/UserData/ListUserData.cs @@ -86,15 +86,12 @@ namespace Upsilon.BaseTypes.UserData index--; if (index > List.Count) { - if (index == List.Count) - { - List.Add(value.ToCSharpObject()); - } - else - { - throw new Exception( - $"Tried adding an item to a list at position {index}, but list is only of length {List.Count}"); - } + throw new Exception( + $"Tried adding an item to a list at position {index}, but list is only of length {List.Count}"); + } + if (index == List.Count) + { + List.Add(value.ToCSharpObject()); } else {