fixing undefined fn error in Promise.halt (#14296)

This commit is contained in:
Bill McConaghy 2017-10-04 12:14:14 -04:00
parent 4129353726
commit 820fe03c76

View file

@ -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;