mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-26 10:05:47 +02:00
Merge pull request #21457 from Snuffleupagus/GetAnnotationsByType-rm-page-check
Remove unneeded check in the "GetAnnotationsByType" worker-thread handler
This commit is contained in:
commit
7f7b38b424
@ -510,20 +510,17 @@ class WorkerMessageHandler {
|
|||||||
startWorkerTask(task);
|
startWorkerTask(task);
|
||||||
}
|
}
|
||||||
pagePromises.push(
|
pagePromises.push(
|
||||||
pdfManager.getPage(i).then(async page => {
|
pdfManager
|
||||||
if (!page) {
|
.getPage(i)
|
||||||
return [];
|
.then(page =>
|
||||||
}
|
|
||||||
return (
|
|
||||||
page.collectAnnotationsByType(
|
page.collectAnnotationsByType(
|
||||||
handler,
|
handler,
|
||||||
task,
|
task,
|
||||||
types,
|
types,
|
||||||
annotationPromises,
|
annotationPromises,
|
||||||
annotationGlobals
|
annotationGlobals
|
||||||
) || []
|
)
|
||||||
);
|
)
|
||||||
})
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
await Promise.all(pagePromises);
|
await Promise.all(pagePromises);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user