diff --git a/Libraries/LibJS/Runtime/ObjectConstructor.cpp b/Libraries/LibJS/Runtime/ObjectConstructor.cpp index 244791cacd..cd8ec2c7a8 100644 --- a/Libraries/LibJS/Runtime/ObjectConstructor.cpp +++ b/Libraries/LibJS/Runtime/ObjectConstructor.cpp @@ -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("Object.setPrototypeOf requires at least two arguments"); auto* object = interpreter.argument(0).to_object(interpreter); if (interpreter.exception()) return {};