bad "localeFile" will lead to JSON parse(localeFIle) failed #18

Closed
jacobbubu opened this Issue Apr 20, 2012 · 1 comment

Comments

Projects
None yet
2 participants

line 226 in file i18n.js

try {
    localeFile = fs.readFileSync(file);
    console.log('read ' + file + ' for locale: ' + locale);
} catch(e) {
    console.log('initializing ' + file);
    write(locale);
    //should RETURN immediately, otherwise the bad localeFile will lead to JSON parse(localeFIle) failed
}

// try to parse to JSON
try {
    locales[locale] = JSON.parse(localeFile);
} catch(e) {

...
}

Owner

mashpie commented May 26, 2012

agreed and fixed (next push)

mashpie closed this May 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment