From 0591812da6ac3000da6bf0e6bf647e6f4f023f1b Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Wed, 3 Jun 2015 00:10:08 -0400 Subject: [PATCH] Make sure array promises pass through undefined --- awx/ui/static/js/shared/lodash-as-promised.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/ui/static/js/shared/lodash-as-promised.js b/awx/ui/static/js/shared/lodash-as-promised.js index 7316c0e021..0120468480 100644 --- a/awx/ui/static/js/shared/lodash-as-promised.js +++ b/awx/ui/static/js/shared/lodash-as-promised.js @@ -85,7 +85,9 @@ function lodashAsPromised($q) { function wrapCallback(method, callback, thisArg, collection) { return method(collection, function(value, index, collection) { - if (_.isFunction(value.then)) { + if (_.isUndefined(value)) { + return callback(value, index, collection); + } else if (_.isFunction(value.then)) { return value.then(_.partialRight(callback, index, collection)); } else { return callback(value, index, collection);