Skip to content

Commit

Permalink
desktop: do not load native crypto on ARM windows app
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Jun 20, 2023
1 parent dc6fa89 commit 548eda9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/desktop/src/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;

0 comments on commit 548eda9

Please sign in to comment.