From 7c1d59c5cf198d1272a8ae0bfd5e2deab32bbb4b Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 24 Feb 2016 01:14:06 -0800 Subject: [PATCH] [ui/promises] rejection values should be instances of Error --- src/ui/public/promises/promises.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/public/promises/promises.js b/src/ui/public/promises/promises.js index 03eccf9db3ab..fb7eddf6afae 100644 --- a/src/ui/public/promises/promises.js +++ b/src/ui/public/promises/promises.js @@ -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;