We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 659799e + 2f4898c commit 475ad85Copy full SHA for 475ad85
1 file changed
fabric/js/fabric-web/src/index.ts
@@ -7,8 +7,13 @@ import * as libveritas from "@spacesprotocol/libveritas";
7
8
export type FabricOptions = Omit<CoreOptions, "provider">;
9
10
-const wasmInit: (() => Promise<any>) | undefined =
11
- (libveritas as any).default ?? (libveritas as any).init ?? (libveritas as any).__wbg_init;
+const wasmInit: (() => Promise<any>) | undefined = (() => {
+ const d = (libveritas as any).default;
12
+ if (typeof d === "function") return d;
13
+ if (typeof (libveritas as any).__wbg_init === "function") return (libveritas as any).__wbg_init;
14
+ // No async init needed — module self-initializes on import
15
+ return undefined;
16
+})();
17
18
let wasmReady: Promise<void> | null = null;
19
0 commit comments