diff --git a/test/driver.js b/test/driver.js index 8d2553950..642c5273c 100644 --- a/test/driver.js +++ b/test/driver.js @@ -79,7 +79,7 @@ function nextTask() { } function isLastPage(task) { - return (task.pdfDoc && (task.pageNum > task.pdfDoc.numPages)); + return (!task.pdfDoc || (task.pageNum > task.pdfDoc.numPages)); } function nextPage(task, loadError) {