Skip to content

Commit c2b4e64

Browse files
committed
no longer use symbols from get-own-property-symbols polyfill, close #774
1 parent 47d11d0 commit c2b4e64

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Changelog
22
##### Unreleased
3+
- 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)
34
- 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)
45

56
##### 3.13.0 - 2021.05.26

packages/core-js/internals/native-symbol.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ var fails = require('../internals/fails');
44

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

0 commit comments

Comments
 (0)