Skip to content

Commit 60bf9b1

Browse files
committed
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.
1 parent 22657e2 commit 60bf9b1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/integration/test_utils.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ async function getFirstSerialized(page, filter = undefined) {
466466
function getAnnotationStorage(page) {
467467
return page.evaluate(() =>
468468
Object.fromEntries(
469-
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable.map?.entries() ||
470-
[]
469+
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable
470+
.map || []
471471
)
472472
);
473473
}

0 commit comments

Comments
 (0)