Skip to content

Commit

Permalink
Merge pull request #57 from serenity-kit/fix-export
Browse files Browse the repository at this point in the history
fix: correct default export for web
  • Loading branch information
nikgraf authored Nov 29, 2023
2 parents a11a978 + 4d077a0 commit a56a2fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ export const ready = new Promise<void>(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
Expand Down

0 comments on commit a56a2fd

Please sign in to comment.