fix conditional

This commit is contained in:
Rodrigo Antinarelli committed 2019-06-13 15:30:13 -03:00
1 parent e90041ccd6
commit ea3142c1ea
1 file changed
+2 -1
+2 -1
View File
@@ -31,7 +31,8 @@ function getKeyForNameSpaces(key) {
}
function getLocales() {
const isWebpackEnv = typeof require.context === 'function';
const isWebpackEnv = !!require.context('./locales', true, /\.json$/);
// require.context is exclusive from webpack, it's needed to escape inside jest
if (!isWebpackEnv) {
return {};