aboutsummaryrefslogtreecommitdiff
path: root/node_modules/p-limit/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/p-limit/index.js')
-rw-r--r--node_modules/p-limit/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/node_modules/p-limit/index.js b/node_modules/p-limit/index.js
index bfafd2688..873f0e70d 100644
--- a/node_modules/p-limit/index.js
+++ b/node_modules/p-limit/index.js
@@ -1,4 +1,6 @@
'use strict';
+const pTry = require('p-try');
+
module.exports = concurrency => {
if (concurrency < 1) {
throw new TypeError('Expected `concurrency` to be a number from 1 and up');
@@ -19,7 +21,7 @@ module.exports = concurrency => {
const run = () => {
activeCount++;
- fn().then(
+ pTry(fn).then(
val => {
resolve(val);
next();