fix locale detect error on mobile apps (#5956)

This commit is contained in:
Ricardo Santana 2020-04-27 12:38:57 -03:00 committed by GitHub
parent 94a15914d0
commit 93ef8495ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ export default {
detect() {
const { LocaleDetector } = NativeModules;
return LocaleDetector.locale.replace(/_/, '-');
return LocaleDetector.locale.replace(/[_-]/, '');
},
init: Function.prototype,