Skip to content

Commit 0bdcf5b

Browse files
committed
Fixed IWindow injection
1 parent 351841a commit 0bdcf5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AngleSharp.Scripting.JavaScript/Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public static Object[] BuildArgs(this EngineInstance context, MethodBase method,
140140
if (max > 0 && parameters[max - 1].GetCustomAttribute<ParamArrayAttribute>() != null)
141141
max--;
142142

143-
var n = Math.Min(arguments.Length - offset, max);
143+
var n = Math.Min(arguments.Length, max - offset);
144144

145145
for (int i = 0; i < n; i++)
146146
args[i + offset] = arguments[i].FromJsValue().As(parameters[i].ParameterType, context);

0 commit comments

Comments
 (0)