From: Chris Duncan Date: Fri, 14 Aug 2026 05:01:14 +0000 (-0700) Subject: Clean up existing worker blob if it already exists before creating anew. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=bd522026209281d17ac09d68d5f3debbe1cd625a;p=nano25519.git Clean up existing worker blob if it already exists before creating anew. --- diff --git a/src/lib/worker.ts b/src/lib/worker.ts index dea84e4..644f7d3 100644 --- a/src/lib/worker.ts +++ b/src/lib/worker.ts @@ -127,6 +127,7 @@ function isBytes (a: unknown): a is Uint8Array { function init (): void { try { BROWSER: { + if (url) URL.revokeObjectURL(url) url = URL.createObjectURL(new Blob([nano25519_worker], { type: 'text/javascript' })) worker = new Worker(url, { type: 'module' }) }