fix locale detect error on mobile apps (#5956)
This commit is contained in:
parent
94a15914d0
commit
93ef8495ca
|
@ -17,7 +17,7 @@ export default {
|
|||
detect() {
|
||||
const { LocaleDetector } = NativeModules;
|
||||
|
||||
return LocaleDetector.locale.replace(/_/, '-');
|
||||
return LocaleDetector.locale.replace(/[_-]/, '');
|
||||
},
|
||||
|
||||
init: Function.prototype,
|
||||
|
|
Loading…
Reference in New Issue