mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
handler error when loading electron store
This commit is contained in:
parent
94553504a7
commit
11f6b82b72
@ -168,7 +168,12 @@ ipcMain.handle('openExternal', async (event, url) => {
|
||||
});
|
||||
|
||||
function createWindow() {
|
||||
const bounds = store.get('winBounds');
|
||||
let bounds = null;
|
||||
try {
|
||||
bounds = store.get('winBounds');
|
||||
} catch (err) {
|
||||
console.log('Error loading bounds from electron store', err.message);
|
||||
}
|
||||
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 1200,
|
||||
@ -182,8 +187,12 @@ function createWindow() {
|
||||
},
|
||||
});
|
||||
|
||||
if (store.get('winIsMaximized')) {
|
||||
mainWindow.maximize();
|
||||
try {
|
||||
if (store.get('winIsMaximized')) {
|
||||
mainWindow.maximize();
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('Error loading maximized flag from electron store', err.message);
|
||||
}
|
||||
|
||||
mainMenu = buildMenu();
|
||||
|
Loading…
Reference in New Issue
Block a user