mirror of https://github.com/keeweb/keeweb
Basic 'no file' error catching
parent
a0ca1238f3
commit
956b105128
|
@ -110,7 +110,12 @@ function setAppOptions() {
|
|||
}
|
||||
|
||||
function createMainWindow() {
|
||||
const titlebarStyle = JSON.parse(fs.readFileSync(appSettingsFileName, 'utf8')).titlebarStyle;
|
||||
let titlebarStyle = 'default'; // predefined value may not be needed
|
||||
try {
|
||||
titlebarStyle = JSON.parse(fs.readFileSync(appSettingsFileName, 'utf8')).titlebarStyle;
|
||||
} catch (e) {
|
||||
if (e.code !== 'ENOENT') throw err;
|
||||
}
|
||||
mainWindow = new electron.BrowserWindow({
|
||||
show: false,
|
||||
width: 1000, height: 700, minWidth: 700, minHeight: 400,
|
||||
|
|
Loading…
Reference in New Issue