mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
LibJS: Object.setPrototypeOf throws error on too few arguments
This commit is contained in:
parent
79958f4520
commit
24430b3860
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ Value ObjectConstructor::get_prototype_of(Interpreter& interpreter)
|
|||
Value ObjectConstructor::set_prototype_of(Interpreter& interpreter)
|
||||
{
|
||||
if (interpreter.argument_count() < 2)
|
||||
return {};
|
||||
interpreter.throw_exception<TypeError>("Object.setPrototypeOf requires at least two arguments");
|
||||
auto* object = interpreter.argument(0).to_object(interpreter);
|
||||
if (interpreter.exception())
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue