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