Skip to content

Commit

Permalink
Add revoke
Browse files Browse the repository at this point in the history
  • Loading branch information
istarkov committed Jul 15, 2024
1 parent b32f0d8 commit 95cd953
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/sdk-components-react/src/html-embed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ const insertScript = (sourceScript: HTMLScriptElement): Promise<void> => {
type: "text/javascript",
});
const url = URL.createObjectURL(blob);
import(/* @vite-ignore */ url).then(resolve).catch(reject);
import(/* @vite-ignore */ url)
.then(resolve)
.catch(reject)
.finally(() => {
URL.revokeObjectURL(url);
});
return;
}

Expand Down

0 comments on commit 95cd953

Please sign in to comment.