mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-22 16:05:56 +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);
|
||||
}
|
||||
pagePromises.push(
|
||||
pdfManager.getPage(i).then(async page => {
|
||||
if (!page) {
|
||||
return [];
|
||||
}
|
||||
return (
|
||||
pdfManager
|
||||
.getPage(i)
|
||||
.then(page =>
|
||||
page.collectAnnotationsByType(
|
||||
handler,
|
||||
task,
|
||||
types,
|
||||
annotationPromises,
|
||||
annotationGlobals
|
||||
) || []
|
||||
);
|
||||
})
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
await Promise.all(pagePromises);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user