From b1ea9332b8ca0a80884e535a5977486b81646e73 Mon Sep 17 00:00:00 2001 From: Kalervo Kujala Date: Sat, 6 Aug 2011 23:33:07 +0300 Subject: [PATCH] Avoid browser-test stoppage when task.pdfDoc is undefined. If nextTask leaves task.pdfDoc as undefined then sendTaskResult will fail on that. SendTaskResult tries to access task.pdfDoc.numPages which cannot succeed. This leads to a complete stop in the browser-test. --- test/driver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {