File tree Expand file tree Collapse file tree 4 files changed +1159
-412
lines changed Expand file tree Collapse file tree 4 files changed +1159
-412
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,19 @@ function hasNativeFlag(flag) {
6767 // Can't use regex literals for testing even in a `try` because regex literals with
6868 // unsupported flags cause a compilation error in IE
6969 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+ }
7080 } catch ( exception ) {
7181 isSupported = false ;
7282 }
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- }
8083 return isSupported ;
8184}
8285// Check for ES6 `u` flag support
Original file line number Diff line number Diff line change @@ -22,3 +22,10 @@ global.hasStrictMode = (function() {
2222
2323 return ! this ;
2424} ( ) ) ;
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 2424 var match = / [ ? & ] v e r s i o n = ( [ ^ & ] + ) / . exec ( location . search ) ;
2525 var version = match ? match [ 1 ] : null ;
2626 var knownVersion = {
27- '4.3.0 ' : true ,
27+ '4.3.1 ' : true ,
2828 '4.2.4' : true ,
2929 '4.2.3' : true ,
3030 '4.2.0' : true ,
You can’t perform that action at this time.
0 commit comments