diff --git a/src/main.js b/src/main.js index 6b2bfae32c6f6be636addcd91ef43aded2696d63..7429fcc087aa871c0198aafc395ab26dcd256178 100644 --- a/src/main.js +++ b/src/main.js @@ -434,20 +434,16 @@ function getUserDefinedLocale() { } const localeConfig = path.join(userDataPath, 'User', 'locale.json'); - return exists(localeConfig).then((result) => { - if (result) { - return bootstrap.readFile(localeConfig).then((content) => { - content = stripComments(content); - try { - const value = JSON.parse(content).locale; - return value && typeof value === 'string' ? value.toLowerCase() : undefined; - } catch (e) { - return undefined; - } - }); - } else { + return bootstrap.readFile(localeConfig).then((content) => { + content = stripComments(content); + try { + const value = JSON.parse(content).locale; + return value && typeof value === 'string' ? value.toLowerCase() : undefined; + } catch (e) { return undefined; } + }, () => { + return undefined; }); }