Skip to content

Commit

Permalink
no longer use symbols from get-own-property-symbols polyfill, close #…
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed May 28, 2021
1 parent 47d11d0 commit c2b4e64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,5 +1,6 @@
## Changelog
##### Unreleased
- No longer uses symbols from `get-own-property-symbols` third-party polyfill if it's installed since they cause a stack overflow, [#774](https://github.com/zloirock/core-js/issues/774)
- Added a workaround of possible browser crash on `Object.prototype` accessors method in WebKit ~ Android 4.0, [#232](https://github.com/zloirock/core-js/issues/232)

##### 3.13.0 - 2021.05.26
Expand Down
6 changes: 4 additions & 2 deletions packages/core-js/internals/native-symbol.js
Expand Up @@ -4,8 +4,10 @@ var fails = require('../internals/fails');

// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
return !String(Symbol()) ||
// Chrome 38 Symbol has incorrect toString conversion
var symbol = Symbol();
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
});

0 comments on commit c2b4e64

Please sign in to comment.