Merge pull request #677 from kkujala/test

Fix javascript strict warnings in driver.js.
This commit is contained in:
vingtetun 2011-10-18 18:08:17 -07:00
commit 303fc114b3

View File

@ -66,7 +66,8 @@ function nextTask() {
cleanup();
if (currentTaskIdx == manifest.length) {
return done();
done();
return;
}
var task = manifest[currentTaskIdx];
task.round = 0;
@ -86,7 +87,11 @@ function nextTask() {
}
function isLastPage(task) {
return task.pageNum > task.pdfDoc.numPages || task.pageNum > task.pageLimit;
var limit = task.pageLimit || 0;
if (!limit || limit > task.pdfDoc.numPages)
limit = task.pdfDoc.numPages;
return task.pageNum > limit;
}
function canvasToDataURL() {