ember-concurrency
ember-concurrency copied to clipboard
Performing a task that errors prior to a yield calls onerror twice
Ember twiddle demo
It seems that if a task errors prior to a yield statement it has the unfortunate result of calling Ember.onerror
twice instead of once.
theTask: task(function* () {
throw new Error('bork');
}).drop()
<button {{action (perform this.theTask)}}>Go</button>
Pressing the button once will call Ember.onerror
twice.
Calling this.theTask.perform()
will also call Ember.onerror
twice.
I think this might be the same issue as https://github.com/machty/ember-concurrency/issues/216?