ump 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils.js +1 -1
- package/package.json +1 -1
package/lib/utils.js
CHANGED
|
@@ -257,7 +257,7 @@ const peach = (arr, fn) => {
|
|
|
257
257
|
const called = func();
|
|
258
258
|
// If the function doesn't return a "then-able", create one with Promise.resolve():
|
|
259
259
|
|
|
260
|
-
return (typeof called.then === 'function' ? called : Promise.resolve(called))
|
|
260
|
+
return (called && typeof called.then === 'function' ? called : Promise.resolve(called))
|
|
261
261
|
.then([].concat.bind(result));
|
|
262
262
|
});
|
|
263
263
|
|