Skip to content

Commit

Permalink
js/canvas: revoke image object url once loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
thewhodidthis committed Aug 14, 2023
1 parent 4c709b0 commit 83d0ddc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export async function loadFile(file) {
uploadWrapper.style.display = "none"
canvasWrapper.style.display = "flex"

URL.revokeObjectURL(url)
MyAltTextOrg.canvas.setBackgroundImage(img, null, {
top: MyAltTextOrg.const.CVS_PADDING,
left: MyAltTextOrg.const.CVS_PADDING
Expand Down

0 comments on commit 83d0ddc

Please sign in to comment.