Skip to content

Commit

Permalink
fix: use Math.pow() to replce ** for Node v6 support in retry-utility
Browse files Browse the repository at this point in the history
  • Loading branch information
RonWang committed Nov 6, 2019
1 parent e7937af commit 1c6f372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/retry-utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function retry(retryConfig, retryCall, shouldRetryCondition, callback) {
let pollCount = -1;
async.doWhilst(
(loopCallback) => {
let retryInterval = retryConfig.base * (retryConfig.factor ** pollCount++);
let retryInterval = retryConfig.base * (Math.pow(retryConfig.factor, pollCount++));
// The very first call is not a retry and hence should not be penalised with a timeout.
if (pollCount === 0) {
retryInterval = 0;
Expand Down

0 comments on commit 1c6f372

Please sign in to comment.