diff --git a/webapp/packages/core-root/src/AsyncTask/AsyncTaskInfoService.ts b/webapp/packages/core-root/src/AsyncTask/AsyncTaskInfoService.ts index 0e7ef38fd4..9f94d3331c 100644 --- a/webapp/packages/core-root/src/AsyncTask/AsyncTaskInfoService.ts +++ b/webapp/packages/core-root/src/AsyncTask/AsyncTaskInfoService.ts @@ -73,14 +73,16 @@ export class AsyncTaskInfoService extends Disposable { this.tasks.set(task.id, task); task.onStatusChange.addHandler(info => { + if (this.taskIdAliases.get(info.id)) { + return; + } + + this.taskIdAliases.set(info.id, task.id); + const pendingEvent = this.pendingEvents.get(info.id); if (pendingEvent) { - const changes = { ...pendingEvent }; this.pendingEvents.delete(info.id); - this.updateTask(task, changes); - } - if (!this.taskIdAliases.get(info.id)) { - this.taskIdAliases.set(info.id, task.id); + this.updateTask(task, pendingEvent); } });