Simplify the getAnnotationStorage integration-test helper function

As can be seen [at MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries#parameters) the `Object.fromEntries` method accepts a `Map` directly, hence using the `Map.prototype.entries` method is superfluous here.
This commit is contained in:
Jonas Jenwald 2025-04-09 13:42:22 +02:00
parent 22657e2b6e
commit 60bf9b133a

View File

@ -466,8 +466,8 @@ async function getFirstSerialized(page, filter = undefined) {
function getAnnotationStorage(page) { function getAnnotationStorage(page) {
return page.evaluate(() => return page.evaluate(() =>
Object.fromEntries( Object.fromEntries(
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable.map?.entries() || window.PDFViewerApplication.pdfDocument.annotationStorage.serializable
[] .map || []
) )
); );
} }