diff --git a/NiL.JS/Core/Interop/NativeReadOnlyList.cs b/NiL.JS/Core/Interop/NativeReadOnlyList.cs index 33515e75c..d4ac53a4d 100644 --- a/NiL.JS/Core/Interop/NativeReadOnlyList.cs +++ b/NiL.JS/Core/Interop/NativeReadOnlyList.cs @@ -25,7 +25,7 @@ public static JSObject Create(object roList) if (!_ctors.TryGetValue(type, out var ctor)) { var itemType = type.GetInterface(ReadOnlyInterfaceName).GetGenericArguments()[0]; - var listType = typeof(NativeReadOnlyList<>).MakeGenericType(typeof(int)); + var listType = typeof(NativeReadOnlyList<>).MakeGenericType(itemType); var prm = Expression.Parameter(typeof(object)); _ctors[type] = ctor = Expression.Lambda>( Expression.New(