Skip to content

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

desktop: do not load native crypto on ARM windows app

Abdullah Atta548eda9a26d0
diff --git a/apps/desktop/src/preload.ts b/apps/desktop/src/preload.ts
index 7f63b0d21..6dafdb8f7 100644
--- a/apps/desktop/src/preload.ts
+++ b/apps/desktop/src/preload.ts
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { ELECTRON_TRPC_CHANNEL } from "electron-trpc/main";
import { type RendererGlobalElectronTRPC } from "electron-trpc/src/types";
-import { NNCrypto } from "@notesnook/crypto";
+import type { NNCrypto } from "@notesnook/crypto";
import { ipcRenderer } from "electron";
declare global {
@@ -45,5 +45,5 @@ globalThis.NativeNNCrypto =
process.arch !== "x64" &&
process.arch !== "ia32"
? undefined
- : NNCrypto;
+ : require("@notesnook/crypto").NNCrypto;
globalThis.os = MAC_APP_STORE ? "mas" : process.platform;