Skip to content

Commit 715fc0b

Browse files
committed
fix: Object.defineProperty should normalize key first
1 parent 7eac789 commit 715fc0b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

crates/tree_shaker/src/builtins/globals/object_constructor.rs

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ impl<'a> Builtins<'a> {
123123
let [object, key, descriptor] = args.destruct_as_array(analyzer, dep, 3, false).0[..] else {
124124
unreachable!()
125125
};
126+
let key = key.get_to_property_key(analyzer);
126127

127128
'trackable: {
128129
if key.get_literal(analyzer).is_none() {

0 commit comments

Comments
 (0)