Skip to content

Commit

Permalink
🐛 fix: Scratch.extensions.register now recycles resources
Browse files Browse the repository at this point in the history
Signed-off-by: FurryR <[email protected]>
  • Loading branch information
FurryR committed Jul 20, 2024
1 parent 7613457 commit ec5ed8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/loader/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class UnsandboxedLoader {
const register = ctx.extensions.register;
// now UnsandboxedLoader only resolves after Scratch.extensions.register called
ctx.extensions.register = function (ext) {
URL.revokeObjectURL(src);
document.head.removeChild(elem);
resolve();
return register.call(this, ext);
}
Expand Down

0 comments on commit ec5ed8e

Please sign in to comment.