Skip to content

Commit

Permalink
fixing undefined fn error in Promise.halt (elastic#14296)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcconaghy committed Oct 5, 2017
1 parent 4129353 commit 820fe03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/public/promises/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.service('Promise', function ($q, $timeout) {
return obj && typeof obj.then === 'function';
};
Promise.halt = _.once(function () {
const promise = new Promise();
const promise = new Promise(() => {});
promise.then = _.constant(promise);
promise.catch = _.constant(promise);
return promise;
Expand Down

0 comments on commit 820fe03

Please sign in to comment.