From 4d077a0d40a95105238ad11f57b7dd4bd7f63dbc Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Wed, 29 Nov 2023 22:10:00 +0100 Subject: [PATCH] fix: correct default export for web --- src/lib.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.ts b/src/lib.ts index 93b4487..95ba261 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -86,16 +86,16 @@ export const ready = new Promise(async (resolve) => { await new Promise((r) => setTimeout(r, 0)); if (isLoadSumoVersion) { - lib = await import('libsodium-wrappers-sumo'); + lib = (await import('libsodium-wrappers-sumo')).default; } else { - lib = await import('libsodium-wrappers'); + lib = (await import('libsodium-wrappers')).default; } await lib.ready; // only after ready the lib is available if (isLoadSumoVersion) { - lib = await import('libsodium-wrappers-sumo'); + lib = (await import('libsodium-wrappers-sumo')).default; } else { - lib = await import('libsodium-wrappers'); + lib = (await import('libsodium-wrappers')).default; } // get all keys