mirror of
https://github.com/status-im/react-native-i18n.git
synced 2025-01-21 01:19:27 +00:00
Uniform code and fix for test friendliness (mocha)
- replace let with const - check existence of `RNI18n` when accessing it's properties - remove unnecessary code
This commit is contained in:
parent
5fa3e0e542
commit
c6691e049a
8
index.js
8
index.js
@ -1,9 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
let { Platform, NativeModules } = require('react-native')
|
||||
let { RNI18n } = NativeModules
|
||||
let I18n = require('./vendor/i18n')
|
||||
const { NativeModules } = require('react-native');
|
||||
const { RNI18n } = NativeModules;
|
||||
let I18n = require('./vendor/i18n');
|
||||
|
||||
I18n.locale = RNI18n.locale.replace(/_/, '-');
|
||||
I18n.locale = (RNI18n) ? RNI18n.locale.replace(/_/, '-') : '';
|
||||
|
||||
module.exports = I18n;
|
||||
|
Loading…
x
Reference in New Issue
Block a user