Skip to content

Commit

Permalink
Merge pull request #6321 from spalger/fix/promise-reject-value
Browse files Browse the repository at this point in the history
[ui/promises] rejection values should be instances of Error
  • Loading branch information
spalger committed Feb 25, 2016
2 parents 41a6fb0 + 7c1d59c commit 73d5c5a
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 @@ -71,7 +71,7 @@ module.service('Promise', function ($q, $timeout) {
});
Promise.try = function (fn, args, ctx) {
if (typeof fn !== 'function') {
return Promise.reject('fn must be a function');
return Promise.reject(new TypeError('fn must be a function'));
}

var value;
Expand Down

0 comments on commit 73d5c5a

Please sign in to comment.