From e06251142372bad90cb8e46152f56de0ba0b7a1b Mon Sep 17 00:00:00 2001 From: Gautam krishna R Date: Sun, 6 Mar 2022 19:46:52 +0530 Subject: [PATCH] using proper scope for createTimeout using proper scope to prevent errors with external bundlers --- lib/retry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/retry.js b/lib/retry.js index 5e85e79..40fe028 100644 --- a/lib/retry.js +++ b/lib/retry.js @@ -31,11 +31,11 @@ exports.timeouts = function(options) { var timeouts = []; for (var i = 0; i < opts.retries; i++) { - timeouts.push(this.createTimeout(i, opts)); + timeouts.push(exports.createTimeout(i, opts)); } if (options && options.forever && !timeouts.length) { - timeouts.push(this.createTimeout(i, opts)); + timeouts.push(exports.createTimeout(i, opts)); } // sort the array numerically ascending