File tree 4 files changed +7
-8
lines changed
packages/core-js/internals 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
## Changelog
2
2
##### Unreleased
3
- - Nothing
3
+ - Fixed regression of V8 on Node 0.12 ` Sting(Symbol()) ` bug, [ # 933 ] ( https://github.com/zloirock/core-js/issues/933 )
4
4
5
5
##### 3.11.3 - 2021.05.05
6
6
- Native promise-based APIs ` Promise#{ catch, finally } ` returns polyfilled ` Promise ` instances when it's required
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ var match, version;
8
8
9
9
if ( v8 ) {
10
10
match = v8 . split ( '.' ) ;
11
- version = match [ 0 ] + match [ 1 ] ;
11
+ version = match [ 0 ] < 4 ? 1 : match [ 0 ] + match [ 1 ] ;
12
12
} else if ( userAgent ) {
13
13
match = userAgent . match ( / E d g e \/ ( \d + ) / ) ;
14
14
if ( ! match || match [ 1 ] >= 74 ) {
Original file line number Diff line number Diff line change 1
- var IS_NODE = require ( '../internals/engine-is-node' ) ;
1
+ /* eslint-disable es/no-symbol -- required for testing */
2
2
var V8_VERSION = require ( '../internals/engine-v8-version' ) ;
3
3
var fails = require ( '../internals/fails' ) ;
4
4
5
5
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
6
6
module . exports = ! ! Object . getOwnPropertySymbols && ! fails ( function ( ) {
7
- // eslint-disable-next-line es/no-symbol -- required for testing
8
- return ! Symbol . sham &&
7
+ return ! String ( Symbol ( ) ) ||
9
8
// Chrome 38 Symbol has incorrect toString conversion
10
9
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
11
- ( IS_NODE ? V8_VERSION === 38 : V8_VERSION > 37 && V8_VERSION < 41 ) ;
10
+ ! Symbol . sham && V8_VERSION && V8_VERSION < 41 ;
12
11
} ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ var match, V8_VERSION;
14
14
15
15
if ( v8 ) {
16
16
match = v8 . split ( '.' ) ;
17
- V8_VERSION = + ( match [ 0 ] + match [ 1 ] ) ;
17
+ V8_VERSION = match [ 0 ] < 4 ? 1 : + ( match [ 0 ] + match [ 1 ] ) ;
18
18
} else if ( USERAGENT ) {
19
19
match = USERAGENT . match ( / E d g e \/ ( \d + ) / ) ;
20
20
if ( ! match || match [ 1 ] >= 74 ) {
@@ -45,7 +45,7 @@ var PROMISES_SUPPORT = function () {
45
45
} ;
46
46
47
47
var SYMBOLS_SUPPORT = function ( ) {
48
- return Symbol && ( IS_NODE ? V8_VERSION !== 38 : ! ( V8_VERSION > 37 && V8_VERSION < 41 ) ) ;
48
+ return String ( Symbol ( ) ) && ! ( V8_VERSION && V8_VERSION < 41 ) ;
49
49
} ;
50
50
51
51
var URL_AND_URL_SEARCH_PARAMS_SUPPORT = function ( ) {
You can’t perform that action at this time.
0 commit comments