-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegExp.toString gives incorrect result without RegExp.flags #536
Labels
Comments
bz2
added a commit
to bz2/core-js
that referenced
this issue
Apr 26, 2019
When the flags property is not available on RegExp, the internals regexp-flags implementation should be used regardless of DESCRIPTORS. Fixes: zloirock#536
As a workaround, if a file depend on // TODO: Remove when zloirock/core-js#536 is fixed upstream.
import 'core-js/es/regexp/flags'; This works even if the regexp/to-string polyfill is autocreated by |
bz2
added a commit
to bz2/core-js
that referenced
this issue
Apr 29, 2019
When the flags property is not available on RegExp, the internals regexp-flags implementation should be used regardless of DESCRIPTORS. Fixes: zloirock#536
bz2
added a commit
to bz2/core-js
that referenced
this issue
Apr 29, 2019
When the flags property is not available on RegExp, the internals regexp-flags implementation should be used regardless of DESCRIPTORS. Fixes: zloirock#536
bz2
added a commit
to bz2/core-js
that referenced
this issue
May 3, 2019
When the flags property is not available on RegExp, the internals regexp-flags implementation should be used regardless of DESCRIPTORS. Fixes: zloirock#536
zloirock
pushed a commit
that referenced
this issue
May 10, 2019
When the flags property is not available on RegExp, the internals regexp-flags implementation should be used regardless of DESCRIPTORS. Fixes: #536
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
RegExp.toString
polyfill creates invalid patterns in the form/a/undefined
unless the browser either supportsRegExp.flags
natively or that is also polyfilled. This is an issue when trying to use targetted imports as created by the@babel/preset-env
settinguseBuiltIns: 'usage'
.From the compat data, this is a problem for browsers like IE 11 and Edge, as Chrome/Firefox and so on have had native support for a while:
https://github.com/zloirock/core-js/blob/v3.0.1/packages/core-js-compat/src/data.js#L786
Tracking this down took a while, so I created minimal-ish project that reproduces the problem for demonstration:
https://github.com/zegami/test_core_regexp
The text was updated successfully, but these errors were encountered: