Skip to content

Commit 347d455

Browse files
committed
fix: only emit taskExecution.interrupted if execution is in progress
1 parent 77a7dfb commit 347d455

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/TaskExecution.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ export default class TaskExecution extends EventEmitter {
4242
const eventBus = injector.get('eventBus');
4343

4444
eventBus.on([ 'selection.changed', 'commandStack.changed' ], () => {
45+
if (this._status !== 'idle') {
46+
this.emit('taskExecution.interrupted');
47+
}
4548
this.cancelTaskExecution();
46-
this.emit('taskExecution.interrupted');
4749
});
4850
}
4951

0 commit comments

Comments
 (0)