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.
}
function isLastPage(task) {
- return (task.pdfDoc && (task.pageNum > task.pdfDoc.numPages));
+ return (!task.pdfDoc || (task.pageNum > task.pdfDoc.numPages));
}
function nextPage(task, loadError) {