don't crash if meta.config is undefined

v1.18.x
Baris Usakli 6 years ago
parent a63ddbe2aa
commit cd02e03f7b

@ -400,7 +400,7 @@
lang = utils.params().lang || config.userLang || config.defaultLang || 'en-GB';
} else {
var meta = require('../../../src/meta');
lang = meta.config.defaultLang || 'en-GB';
lang = meta.config && meta.config.defaultLang ? meta.config.defaultLang : 'en-GB';
}
return lang;

Loading…
Cancel
Save