Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions fabric/js/fabric-web/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ import * as libveritas from "@spacesprotocol/libveritas";

export type FabricOptions = Omit<CoreOptions, "provider">;

const wasmInit: (() => Promise<any>) | undefined =
(libveritas as any).default ?? (libveritas as any).init ?? (libveritas as any).__wbg_init;
const wasmInit: (() => Promise<any>) | undefined = (() => {
const d = (libveritas as any).default;
if (typeof d === "function") return d;
if (typeof (libveritas as any).__wbg_init === "function") return (libveritas as any).__wbg_init;
// No async init needed — module self-initializes on import
return undefined;
})();

let wasmReady: Promise<void> | null = null;

Expand Down
Loading