fix conditional
This commit is contained in:
parent
e90041ccd6
commit
ea3142c1ea
@ -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 {};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user