Skip to content

Commit bd45bc1

Browse files
fix for undefined waitFor
1 parent cf3e948 commit bd45bc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Apify.main(async () => {
7171
}
7272

7373
const handlePageFunction = async ({ request, $, html, page, response }) => {
74-
if (page) {
74+
if (page && waitFor) {
7575
// We wait for number in ms or a selector
7676
const maybeNumber = Number(waitFor);
7777
await page.waitFor(maybeNumber || maybeNumber === 0 ? maybeNumber : waitFor);

0 commit comments

Comments
 (0)