File tree 4 files changed +1159
-412
lines changed
4 files changed +1159
-412
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,19 @@ function hasNativeFlag(flag) {
67
67
// Can't use regex literals for testing even in a `try` because regex literals with
68
68
// unsupported flags cause a compilation error in IE
69
69
new RegExp ( '' , flag ) ;
70
+
71
+ // Work around a broken/incomplete IE11 polyfill for sticky introduced in core-js 3.6.0
72
+ if ( flag === 'y' ) {
73
+ // Using function to avoid babel transform to regex literal
74
+ const gy = ( ( ) => 'gy' ) ( ) ;
75
+ const incompleteY = '.a' . replace ( new RegExp ( 'a' , gy ) , '.' ) === '..' ;
76
+ if ( incompleteY ) {
77
+ isSupported = false ;
78
+ }
79
+ }
70
80
} catch ( exception ) {
71
81
isSupported = false ;
72
82
}
73
- // Work around a broken/incomplete IE11 polyfill for sticky introduced in core-js 3.6.0
74
- if ( flag === 'y' ) {
75
- const incompleteY = '.a' . replace ( new RegExp ( 'a' , 'gy' ) , '.' ) === '..' ;
76
- if ( incompleteY ) {
77
- isSupported = false ;
78
- }
79
- }
80
83
return isSupported ;
81
84
}
82
85
// Check for ES6 `u` flag support
Original file line number Diff line number Diff line change @@ -22,3 +22,10 @@ global.hasStrictMode = (function() {
22
22
23
23
return ! this ;
24
24
} ( ) ) ;
25
+
26
+ // Naive polyfill of String.prototype.repeat
27
+ if ( ! String . prototype . repeat ) {
28
+ String . prototype . repeat = function ( count ) {
29
+ return count ? Array ( count + 1 ) . join ( this ) : '' ;
30
+ } ;
31
+ }
Original file line number Diff line number Diff line change 24
24
var match = / [ ? & ] v e r s i o n = ( [ ^ & ] + ) / . exec ( location . search ) ;
25
25
var version = match ? match [ 1 ] : null ;
26
26
var knownVersion = {
27
- '4.3.0 ' : true ,
27
+ '4.3.1 ' : true ,
28
28
'4.2.4' : true ,
29
29
'4.2.3' : true ,
30
30
'4.2.0' : true ,
You can’t perform that action at this time.
0 commit comments