ember-concurrency icon indicating copy to clipboard operation
ember-concurrency copied to clipboard

Performing a task that errors prior to a yield calls onerror twice

Open sukima opened this issue 6 years ago • 1 comments

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.

sukima avatar Jan 04 '19 23:01 sukima

I think this might be the same issue as https://github.com/machty/ember-concurrency/issues/216?

maxfierke avatar Jan 07 '19 16:01 maxfierke