Fix unlimited refresh tries

This commit is contained in:
Kevin MacMartin 2021-01-03 21:52:53 -05:00
parent 2b5900c6a7
commit 2893d9fe28

View file

@ -27,6 +27,7 @@ async function run() {
const page = await browser.newPage(),
maxVariance = 8,
refreshTries = Number(config.refresh_tries),
startTime = Number(config.start_time.replace(/:.*/, "")) + Number(config.start_time.replace(/^[^:]*:/, "")) / 60,
endTime = Number(config.end_time.replace(/:.*/, "")) + Number(config.end_time.replace(/^[^:]*:/, "")) / 60;
@ -116,8 +117,8 @@ async function run() {
}
break;
} else if (config.refresh_tries !== 0 && currentTry > config.refresh_tries) {
log(`Fail: Maximum number of refresh tries reached (${config.refresh_tries})`);
} else if (refreshTries !== 0 && currentTry > refreshTries) {
log(`Fail: Maximum number of refresh tries reached (${refreshTries})`);
success = false;
break;
} else {