Skip to content

Commit

Permalink
fix: set background window stayed open while main window was closed
Browse files Browse the repository at this point in the history
  • Loading branch information
YisusGaming committed Jan 9, 2023
1 parent f560d85 commit 91aeebb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "random-browser",
"productName": "Random Browser",
"version": "1.2.0",
"version": "1.2.1",
"description": "Just a random browser...",
"main": "build/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/config/app.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v1.2.0"
"version": "v1.2.1"
}
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ app.on('ready', () => {

main.webContents.send('update-background', configs.background);
});
main.on('close', () => {
if (backgroundSelect != null) {
backgroundSelect.close()
}
});
});

function searchWindow(url: string) {
Expand Down

0 comments on commit 91aeebb

Please sign in to comment.