Skip to content

Commit

Permalink
https://github.com/DynamoDS/DynamoWishlist/issues/187
Browse files Browse the repository at this point in the history
  • Loading branch information
tinrobot2000 authored May 10, 2024
1 parent 8adde94 commit a7e4212
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Libraries/CoreNodes/List.cs
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,15 @@ public static IList ShiftIndices(IList list, int amount)
[IsVisibleInDynamoLibrary(true)]
public static object GetItemAtIndex(IList list, int index)
{
if (index<0)
{
index = list.Count + index;
}

if (index >= list.Count || index < 0)
{
throw new IndexOutOfRangeException();
}
return list[index];
}

Expand Down

0 comments on commit a7e4212

Please sign in to comment.