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.
This commit is contained in:
parent
17e02e3c39
commit
b1ea9332b8
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user