Skip to content

Commit

Permalink
fixing instance lock issues
Browse files Browse the repository at this point in the history
  • Loading branch information
amitojsingh366 committed Mar 28, 2021
1 parent 52e028b commit 2f23b61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "easy-rpc",
"version": "2.0.10",
"version": "2.0.11",
"description": "A easy discord rpc",
"main": "dist/index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ if (!instanceLock) {
} else {
app.on("second-instance", (event, argv, workingDirectory) => {
if (mainWindow) {
if (mainWindow.isMinimized()) {
mainWindow.restore();
} else if (mainWindow.isDestroyed()) {
if (mainWindow.isDestroyed()) {
createWindow();
} else if (mainWindow.isMinimized()) {
mainWindow.restore();
}
mainWindow.focus();
} else {
Expand Down

0 comments on commit 2f23b61

Please sign in to comment.