andyearnshaw / Intl.js

Compatibility implementation of the ECMAScript Internationalization API (ECMA-402) for JavaScript -- UNMAINTAINED
Other
1.7k stars 215 forks source link

toLocaleString polyfill causes regex error #308

Open pbcomm opened 6 years ago

pbcomm commented 6 years ago

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 commented 5 years ago

Happens to me too.

hielkehoeve commented 5 years ago

Same here

ghostd commented 5 years ago

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

danieldiekmeier commented 4 years ago

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()
}