Skip to content

Commit

Permalink
fix bounds.json path
Browse files Browse the repository at this point in the history
  • Loading branch information
MOTOO11 committed Dec 11, 2016
1 parent f04a6f1 commit 3f6f203
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/electron/ts/Main.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ class Main {
this.mainWindow = null;
});
this.mainWindow.on('close', () => {
var info_path = path.join(app.getPath("userData"), "bounds-info.json");
fs.writeFileSync(info_path, JSON.stringify(this.mainWindow.getBounds()));
try {
fs.writeFileSync(info_path, JSON.stringify(this.mainWindow.getBounds()));
} catch (e) { }
});
this.mainWindow.webContents.on('new-window', (e, url) => {
e.preventDefault();
Expand Down

0 comments on commit 3f6f203

Please sign in to comment.