This repository was archived by the owner on Apr 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 215
IE10 "Syntax error in regular expression" when using DatePipe in Angular 2 #270
Comments
Did you try to disabled the regexp cache? More details here: https://github.com/andyearnshaw/Intl.js#locale-data, read the second paragraph, and let us know. |
Yes, disabling the regexp cache helps. |
fabianishere
added a commit
to fabianishere/next.js
that referenced
this issue
Apr 10, 2020
This change adds a workaround for an issue with the Intl.js polyfill library where it instantiates an invalid regular expression. Relevant issues: andyearnshaw/Intl.js#270 andyearnshaw/Intl.js#256 andyearnshaw/Intl.js#306 Until this issue is fixed upstream, we use a workaround in the example. Fixes: vercel#11777
fabianishere
added a commit
to fabianishere/next.js
that referenced
this issue
Apr 10, 2020
This change adds a workaround for an issue with the Intl.js polyfill library where it instantiates an invalid regular expression. Relevant issues: andyearnshaw/Intl.js#270 andyearnshaw/Intl.js#256 andyearnshaw/Intl.js#306 Until this issue is fixed upstream, we use a workaround in the example. Fixes: vercel#11777
Timer
pushed a commit
to vercel/next.js
that referenced
this issue
Apr 13, 2020
* Add workaround for Intl.js RegEx issue This change adds a workaround for an issue with the Intl.js polyfill library where it instantiates an invalid regular expression. Relevant issues: andyearnshaw/Intl.js#270 andyearnshaw/Intl.js#256 andyearnshaw/Intl.js#306 Until this issue is fixed upstream, we use a workaround in the example. Fixes: #11777 * Do not load Intl.js polyfill by default on Node This change updates the `with-react-intl` example to prevent it from polyfilling `Intl` in a Node environment when it is not needed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This may not be Angular 2 specific, but I am using angular-cli 1.0.0 with intl polyfills:
When formatting with date pipe, itl crashes with "Syntax error in regular expression".
It happens after regex optimization in intl:
If I comment out this reqex shortening, everything is working fine.
Example of exprStr that is incorrectly shortened before shortening:
\\\{\\((((((((())))))))\})
After:
[\s\S]{6}(((((((())))))))[\s\S]{1})
The text was updated successfully, but these errors were encountered: