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 authored and chrisronline committed Dec 1, 2017
1 parent 5651aca commit 25abdd1
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 25abdd1

Please sign in to comment.