Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

toLocaleString polyfill causes regex error #308

Open
pbcomm opened this issue Apr 5, 2018 · 4 comments
Open

toLocaleString polyfill causes regex error #308

pbcomm opened this issue Apr 5, 2018 · 4 comments

Comments

@pbcomm
Copy link

pbcomm commented Apr 5, 2018

Error: Invalid regular expression: /[\s\S]{2}(((((((())))))))[\s\S]{1})/: Unmatched ')'

This happens on all browsers that require the polyfill.
Using version 1.2.5

@pedrofracassi
Copy link

Happens to me too.

@hielkehoeve
Copy link

Same here

@ghostd
Copy link

ghostd commented Dec 18, 2018

Did you try to call Intl.__disableRegExpRestore() as mentioned here and here?

@danieldiekmeier
Copy link

danieldiekmeier commented Mar 11, 2020

This also happened to us on Android in our React Native app. We used this code to fix it on Android, but do nothing on iOS:

if (global.Intl.__disableRegExpRestore) {
  global.Intl.__disableRegExpRestore()
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants