Skip to content

Commit 87d9304

Browse files
committed
* Minor refactoring
1 parent aa346e6 commit 87d9304

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

public/electron.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const createWindow = () => {
4141
})
4242
};
4343

44-
app.on("ready", createWindow);
44+
app.whenReady().then(createWindow);
4545

4646
app.on("window-all-closed", () => {
4747
if (process.platform !== "darwin") {
@@ -50,7 +50,7 @@ app.on("window-all-closed", () => {
5050
});
5151

5252
app.on("activate", () => {
53-
if (mainWindow === null) {
53+
if (BrowserWindow.getAllWindows().length === 0) {
5454
createWindow();
5555
}
5656
});

0 commit comments

Comments
 (0)