Skip to content

Commit

Permalink
[ui/promises] rejection values should be instances of Error
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Feb 24, 2016
1 parent 4193985 commit 7c1d59c
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 7c1d59c

Please sign in to comment.