mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 12:30:12 +02:00
Prevent second app instance (#62)
This commit is contained in:
@@ -61,6 +61,12 @@ const installExtensions = async () => {
|
||||
.catch(console.log);
|
||||
};
|
||||
|
||||
const singleInstance = app.requestSingleInstanceLock();
|
||||
|
||||
if (!singleInstance) {
|
||||
app.quit();
|
||||
}
|
||||
|
||||
const createWindow = async () => {
|
||||
if (isDevelopment) {
|
||||
await installExtensions();
|
||||
|
||||
Reference in New Issue
Block a user