diff --git a/forEachAsync.js b/forEachAsync.js index a309285..ef034ac 100644 --- a/forEachAsync.js +++ b/forEachAsync.js @@ -26,7 +26,7 @@ ret = result = fn(item, k, arr); } - if (!ret.then) { + if (!ret || !ret.then) { ret = PromiseA.resolve(result); }