-
-
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
IE11 + [email protected] String.prototype.split doesn't work with regexp #751
Comments
i encountered the same bug, and can confirm that importing core-js into two js files is the root cause. importing it in only one file fixes the problem. |
I'm also running into the same issue. My code path results in a second import which causes the bug to manifest. |
In case this helps someone: JakeChampion/fetch#748 |
Hi everyone. I am facing the same issue. It is still reproduced in IE11 with the latest version of core-js. However the scenario is pretty tricky to reproduce. So I created a minimal repo with needed steps. Hope it helps. |
Hi, the issue is reproducible with other regexp too for example |
Please show your |
@slowcheetah, will result of |
I took a deeper dive into this issue. The problem is caused by this line. It turns out |
Is there an older version of core-js that does not show this issue? It looks like there were changes related to adding more regexp.exec requires in 3.6.2 |
I downgraded to |
The bug was introduced by version 3.6.0 due to support of |
is reverting the sticky flag support considered? |
@toxik Not yet. But I think about it, because I can’t make it work correctly and break nothing |
@slowcheetah have you got any news regarding a revert/fix ? thanks |
Gjøres pga følgende issues; JakeChampion/fetch#750 JakeChampion/fetch#748 zloirock/core-js#751 zloirock/core-js#741 I bunn og grunn, core-js@^3.6.0 introduserte støtte for String.prototype.split med regex som har sticky-flag. Pga bug her så fungerer ikke funksjonen som forventet noe mer i eldre IE11 versjoner. E.g `"test".split(/e/) === ['t', 'e', 's', 't']`, denne burde gitt `['t', 'st']`
Suspected cause is <zloirock/core-js#751>, via <d3/d3-zoom#200>, which is used in SODA.
you can upgrade XRegExp to v4.4.0 instead – slevithan/xregexp#300 |
same problem with 3.8.0. |
@zloirock @slowcheetah Are there any plans to revert sticky flag? |
@Jokero sticky flag will not be reverted. Feel free to work on exploring and fixing this issue without it. |
I looked into this a bit. As far as I can tell the issue lies in the way In order for However, these are not included with So I think the solution would be for @zloirock Do you agree? I can try to provide a PR for this, but I am unsure how to do this correctly. Should I use a simple I assume a similar issue could exist with |
@Khartir sounds reasonable, you could try to add a PR. I don't think that it could affect |
Var tidligere nødvendig for å låse core-js til 3.5.0 versjonen, siden alle nyere versjoner hadde en regex-bug. Dette skal nå være fikset i siste versjon, og dette var kun ett problem i eldre versjoner av IE11 som ikke er mye brukt noe mer. Tenker det derfor er innafor å teste ut om vi kan rydde opp litt i avhengighetene våre. For bedre dokumentasjon om vi skal reverte denne, så inkluderer jeg den originale commit-meldingen som introduserte overskrivingen; ``` Gjøres pga følgende issues; JakeChampion/fetch#750 JakeChampion/fetch#748 zloirock/core-js#751 zloirock/core-js#741 I bunn og grunn, core-js@^3.6.0 introduserte støtte for String.prototype.split med regex som har sticky-flag. Pga bug her så fungerer ikke funksjonen som forventet noe mer i eldre IE11 versjoner. E.g `"test".split(/e/) === ['t', 'e', 's', 't']`, denne burde gitt `['t', 'st']` ```
My team just experienced this issue because we were running core-js 3.9.1 in our code. |
repo to reproduce
https://github.com/kmsheng/core-js-bug
Note that core-js was imported twice,
one in src/js/index.js and the other one in assets/js/default.js
simlar issue
#741
The text was updated successfully, but these errors were encountered: