mishig HF staff commited on
Commit
c7f2831
1 Parent(s): 0bf6097

Clear itneral on img upload

Browse files
Files changed (1) hide show
  1. src/routes/+page.svelte +3 -0
src/routes/+page.svelte CHANGED
@@ -208,6 +208,9 @@
208
  }
209
 
210
  async function drawUploadedImg(file: File) {
 
 
 
211
  const imgEl = new Image();
212
  imgEl.src = URL.createObjectURL(file);
213
  // await image.onload
 
208
  }
209
 
210
  async function drawUploadedImg(file: File) {
211
+ if(interval){
212
+ clearInterval(interval);
213
+ }
214
  const imgEl = new Image();
215
  imgEl.src = URL.createObjectURL(file);
216
  // await image.onload