diff --git a/src/xregexp.js b/src/xregexp.js index f879a256..b7f1e1ad 100644 --- a/src/xregexp.js +++ b/src/xregexp.js @@ -70,6 +70,13 @@ function hasNativeFlag(flag) { } catch (exception) { isSupported = false; } + // Work around a broken/incomplete IE11 polyfill for sticky introduced in core-js 3.6.0 + if (flag === 'y') { + const incompleteY = '.a'.replace(new RegExp('a', 'gy'), '.') === '..'; + if (incompleteY) { + isSupported = false; + } + } return isSupported; } // Check for ES6 `u` flag support