Skip to content

Commit

Permalink
fix(file-item): cancel debounced thumb generation on element disconne…
Browse files Browse the repository at this point in the history
…ct (#294)
  • Loading branch information
nd0ut authored Oct 5, 2022
1 parent a42686c commit 7371335
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/FileItem/FileItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ export class FileItem extends UploaderBlock {
destroyCallback() {
super.destroyCallback();

this._debouncedGenerateThumb.cancel();
FileItem.activeInstances.delete(this);

this._reset();
Expand All @@ -353,6 +352,7 @@ export class FileItem extends UploaderBlock {
disconnectedCallback() {
super.disconnectedCallback();

this._debouncedGenerateThumb.cancel();
this._observer?.disconnect();
}

Expand Down

0 comments on commit 7371335

Please sign in to comment.