diff --git a/package.json b/package.json index 53dc11fba..1e9fec7cd 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "luxon": "^1.3.0", "object-scan": "^13.0.0", "p-retry": "^4.1.0", - "p-throttle": "^3.1.0", + "p-throttle": "^4.1.1", "pinkie-promise": "^2.0.1", "qs": "^6.6.0", "slugg": "^1.2.0", diff --git a/throttle.js b/throttle.js index bf3557a19..ad1d2929d 100644 --- a/throttle.js +++ b/throttle.js @@ -9,7 +9,7 @@ const withThrottling = (profile, limit = 5, interval = 1000) => { return { ...profile, - request: throttle(request, limit, interval) + request: throttle({limit, interval})(request) } }