Index: sdk/lib/_internal/js_runtime/lib/js_helper.dart |
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart |
index 6f5cf9df7c8110bbb93933671bf53d06ea1cfb54..7354ca2b9723d2e4dc43ade0de02c5fed5626e55 100644 |
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart |
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart |
@@ -1369,6 +1369,11 @@ class Primitives { |
} |
if (!acceptsOptionalArguments) { |
+ if (namedArguments != null && namedArguments.isNotEmpty) { |
+ // Tried to invoke a function that takes a fixed number of arguments |
+ // with named (optional) arguments. |
+ return functionNoSuchMethod(function, arguments, namedArguments); |
+ } |
if (argumentCount == requiredParameterCount) { |
return JS('var', r'#.apply(#, #)', jsFunction, function, arguments); |
} |