Skip to content

Commit

Permalink
fix handling some cases of non-enumerable symbol keys from Symbol p…
Browse files Browse the repository at this point in the history
…olyfill
  • Loading branch information
zloirock committed Dec 12, 2023
1 parent 6d68742 commit bc4497e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,5 +1,6 @@
## Changelog
##### Unreleased
- Fixed handling some cases of non-enumerable symbol keys from `Symbol` polyfill
- Unneeded NodeJS domains-related logic removed from `queueMicrotask`
- Refactoring, some optimizations
- Compat data improvements:
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js/modules/es.symbol.constructor.js
Expand Up @@ -97,7 +97,7 @@ var $defineProperty = function defineProperty(O, P, Attributes) {
anObject(Attributes);
if (hasOwn(AllSymbols, key)) {
if (!Attributes.enumerable) {
if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, nativeObjectCreate(null)));
O[HIDDEN][key] = true;
} else {
if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
Expand Down

0 comments on commit bc4497e

Please sign in to comment.