mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibJS: Handle Object.prototype.hasOwnProperty() with no arg correctly
I.e. the same as hasOwnProperty(undefined) or hasOwnProperty("undefined") :^)
This commit is contained in:
parent
4419685b7e
commit
0a0ba64383
2 changed files with 6 additions and 2 deletions
|
@ -57,8 +57,6 @@ Value ObjectPrototype::has_own_property(Interpreter& interpreter)
|
|||
auto* this_object = interpreter.this_value().to_object(interpreter.heap());
|
||||
if (!this_object)
|
||||
return {};
|
||||
if (!interpreter.argument_count())
|
||||
return {};
|
||||
return Value(this_object->has_own_property(interpreter.argument(0).to_string()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue