diff --git a/package.json b/package.json index a05854e..59abea5 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/index.ts b/src/index.ts index d84ede3..7964da5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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 {