Skip to content

Commit 0863900

Browse files
committed
fix calling methods with optional args
1 parent 19e8e93 commit 0863900

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtime/Source/Binding/DynamicMethod.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ public JSValue Invoke(JSContext ctx, JSValue this_obj, int argc, JSValue[] argv)
421421
var methodInfo = _delegate.Method;
422422
var parameters = methodInfo.GetParameters();
423423
var nArgs = Math.Min(argc, parameters.Length);
424-
var args = new object[nArgs];
424+
var args = new object[parameters.Length];
425425
for (var i = 0; i < nArgs; i++)
426426
{
427427
if (!Values.js_get_var(ctx, argv[i], parameters[i].ParameterType, out args[i]))

0 commit comments

Comments
 (0)