Load locale information only after application's 'ready' event

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-07-20 10:18:50 -07:00
parent 5526958c52
commit 53d1e7e6c7
No known key found for this signature in database
GPG key ID: A4931C09644C654B
2 changed files with 29 additions and 18 deletions

View file

@ -40,9 +40,14 @@ if (config.environment === 'production' && !process.mas) {
const userConfig = require('./app/user_config');
let windowConfig = userConfig.get('window');
const locale = require('./app/locale');
const loadLocale = require('./app/locale').load;
let locale;
function createWindow () {
if (!locale) {
locale = loadLocale();
}
const windowOptions = Object.assign({
width: 800,
height: 610,