Merge pull request #21457 from Snuffleupagus/GetAnnotationsByType-rm-page-check

Remove unneeded check in the "GetAnnotationsByType" worker-thread handler
This commit is contained in:
Tim van der Meij 2026-06-15 21:41:10 +02:00 committed by GitHub
commit 7f7b38b424
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);