Don't break if a plugin hasn't got a locales dir

This commit is contained in:
Marcel Klehr 2012-12-19 21:43:15 +01:00
parent cf24e53eae
commit 7aba02f0cf
1 changed files with 1 additions and 0 deletions

View File

@ -17,6 +17,7 @@ function getAllLocales() {
// into `results` (files from various dirs are grouped by lang code)
// (only json files with valid language code as name)
function extractLangs(dir) {
if(!fs.existsSync(dir)) return;
var stat = fs.lstatSync(dir);
if (!stat.isDirectory() || stat.isSymbolicLink()) return;