mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
fix stale assemblyStatus in 'transloadit:assembly-cancelled' event
This commit is contained in:
parent
12de077e6d
commit
08bb847785
1 changed files with 4 additions and 1 deletions
|
|
@ -658,7 +658,10 @@ export default class Transloadit<
|
|||
async #cancelAssembly(assembly: AssemblyResponse) {
|
||||
await this.client.cancelAssembly(assembly)
|
||||
// TODO bubble this through AssemblyWatcher so its event handlers can clean up correctly
|
||||
this.uppy.emit('transloadit:assembly-cancelled', assembly)
|
||||
|
||||
// assemblyStatus is updated since the cancellation is triggered , emit the updated assemblyStatus
|
||||
const updatedAssemblyStatus = this.assembly?.status ?? assembly
|
||||
this.uppy.emit('transloadit:assembly-cancelled', updatedAssemblyStatus)
|
||||
this.assembly = undefined
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue