mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibJS: Remove Proxy() argument count check
Let's just treat missing arguments as undefined and throw with 'target/handler must be object' - this is more JavaScript-y.
This commit is contained in:
parent
5ff85abe8c
commit
e39dd65cf0
3 changed files with 8 additions and 8 deletions
|
@ -38,11 +38,6 @@ Value ProxyConstructor::call()
|
|||
Value ProxyConstructor::construct(Function&)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
if (vm.argument_count() < 2) {
|
||||
vm.throw_exception<TypeError>(global_object(), ErrorType::ProxyTwoArguments);
|
||||
return {};
|
||||
}
|
||||
|
||||
auto target = vm.argument(0);
|
||||
auto handler = vm.argument(1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue