Skip to content

Commit

Permalink
possible fix for #15490
Browse files Browse the repository at this point in the history
  • Loading branch information
bekzod committed Jul 16, 2017
1 parent cb97ca5 commit 1eb684a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ember-testing/lib/test/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ export default class TestPromise extends RSVP.Promise {
lastPromise = this;
}

then(onFulfillment, ...args) {
return super.then(result => isolate(onFulfillment, result), ...args);
then(_onFulfillment, ...args) {
let onFulfillment = typeof _onFulfillment === 'function' ?
result => isolate(_onFulfillment, result) : null;
return super.then(onFulfillment, ...args);
}
}

Expand Down

0 comments on commit 1eb684a

Please sign in to comment.