Browse Source

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.
Kalervo Kujala 14 years ago
parent
commit
b1ea9332b8
  1. 2
      test/driver.js

2
test/driver.js

@ -79,7 +79,7 @@ function nextTask() {
} }
function isLastPage(task) { function isLastPage(task) {
return (task.pdfDoc && (task.pageNum > task.pdfDoc.numPages)); return (!task.pdfDoc || (task.pageNum > task.pdfDoc.numPages));
} }
function nextPage(task, loadError) { function nextPage(task, loadError) {

Loading…
Cancel
Save