Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: disallow multiple instances (fixes streetwriters/notesnook#563)

thecodrr94ef8c961afd
diff --git a/apps/web/desktop/electron.js b/apps/web/desktop/electron.js
index f631b3a85..e9bd69772 100644
--- a/apps/web/desktop/electron.js
+++ b/apps/web/desktop/electron.js
@@ -18,6 +18,11 @@ try {
require("electron-reloader")(module);
} catch (_) {}
+// only run a single instance
+if (app.requestSingleInstanceLock()) {
+ app.exit();
+}
+
/**
* @type {BrowserWindow}
*/