240 attempts should not just be 239 :D

This commit is contained in:
Himanshu Mishra
2020-05-05 20:42:44 +09:00
parent 5d5d093b20
commit b36bf68d7d
+1 -1
View File
@@ -106,7 +106,7 @@ async function waitForPageWithText(
} catch (error) {
if (error.message.match(EXPECTED_LOAD_ERRORS)) {
loadAttempts++;
if (loadAttempts > maxLoadAttempts) {
if (loadAttempts >= maxLoadAttempts) {
throw new Error(
`Failed to load page '${path}', max number of attempts reached`,
);