DEV: prevents uppy to act on destroyed object (#14224)
This commit is contained in:
parent
d2eef423c3
commit
8bb331e63f
|
@ -147,6 +147,10 @@ export default Mixin.create({
|
|||
});
|
||||
|
||||
this._uppyInstance.on("progress", (progress) => {
|
||||
if (this.isDestroying || this.isDestroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.set("uploadProgress", progress);
|
||||
});
|
||||
|
||||
|
|
|
@ -103,6 +103,10 @@ export default Mixin.create({
|
|||
});
|
||||
|
||||
$upload.on("fileuploadprogressall", (e, data) => {
|
||||
if (this.isDestroying || this.isDestroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
const progress = parseInt((data.loaded / data.total) * 100, 10);
|
||||
this.set("uploadProgress", progress);
|
||||
});
|
||||
|
|
|
@ -128,6 +128,10 @@ export default Mixin.create({
|
|||
this._uppyInstance.use(UppyChecksum, { capabilities: this.capabilities });
|
||||
|
||||
this._uppyInstance.on("progress", (progress) => {
|
||||
if (this.isDestroying || this.isDestroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.set("uploadProgress", progress);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue