mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
LibJS: Let Object::delete_property() return a bool, not Value
Just like the various define_property functions, this should return a bool directly and let the caller deal with wrapping it in a Value, if necessary.
This commit is contained in:
parent
4788c94d34
commit
ec62783af9
6 changed files with 20 additions and 20 deletions
|
@ -683,11 +683,11 @@ Value UnaryExpression::execute(Interpreter& interpreter, GlobalObject& global_ob
|
|||
// FIXME: Support deleting locals
|
||||
VERIFY(!reference.is_local_variable());
|
||||
if (reference.is_global_variable())
|
||||
return global_object.delete_property(reference.name());
|
||||
return Value(global_object.delete_property(reference.name()));
|
||||
auto* base_object = reference.base().to_object(global_object);
|
||||
if (!base_object)
|
||||
return {};
|
||||
return base_object->delete_property(reference.name());
|
||||
return Value(base_object->delete_property(reference.name()));
|
||||
}
|
||||
|
||||
Value lhs_result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue