mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 22:52:07 +00:00
LibJS: Distinguish between omitted descriptor attributes and false ones
When calling Object.defineProperty, there is now a difference between omitting a descriptor attribute and specifying that it is false. For example, "{}" and "{ configurable: false }" will have different attribute values.
This commit is contained in:
parent
5c485d4a1e
commit
5ad5322f6a
8 changed files with 186 additions and 83 deletions
|
@ -1304,7 +1304,7 @@ Value ObjectExpression::execute(Interpreter& interpreter) const
|
|||
auto& obj_to_spread = key_result.as_object();
|
||||
|
||||
for (auto& it : obj_to_spread.shape().property_table_ordered()) {
|
||||
if (it.value.attributes & Attribute::Enumerable)
|
||||
if (it.value.attributes.is_enumerable())
|
||||
object->define_property(it.key, obj_to_spread.get(it.key));
|
||||
}
|
||||
} else if (key_result.is_string()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue