desktop: do not load native crypto on ARM windows app

This commit is contained in:
Abdullah Atta
2023-06-20 20:24:10 +05:00
parent dc6fa89c9c
commit 548eda9a26

View File

@@ -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;