Skip to content

Commit

Permalink
refactor: revert generator usage in for loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpl committed Sep 6, 2016
1 parent fcb2064 commit 992cd56
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/cmd/run.js
Expand Up @@ -111,13 +111,7 @@ export function defaultFirefoxClient(
async function establishConnection() {
var lastError;

function* range(min: number, max: number, step: number = 1) {
for (let i = min; i <= max; i += step) {
yield i;
}
}

for (const retries of range(0, maxRetries)) {
for (let retries = 0; retries <= maxRetries; retries++) {
try {
return await connectToFirefox();
} catch (error) {
Expand Down

0 comments on commit 992cd56

Please sign in to comment.