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
Backports PR #6321
  • Loading branch information
epixa committed Feb 25, 2016
1 parent 0e99e7d commit 93feb51
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 @@ define(function (require) {
});
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 93feb51

Please sign in to comment.